avoid failed encodings / stop bad charsets early
Merge pull request #775 from zendesk/grosser/failed-encoding

Bug: Avoid failed encodings / bad charsets