Skip to content

Commit

Permalink
🐛 Fix very rare case of ?bad? bytes payload that cause decode/encode …
Browse files Browse the repository at this point in the history
…errors (#40)
  • Loading branch information
Ousret authored May 13, 2021
1 parent 523c71b commit d2fac2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion charset_normalizer/normalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def output(self, encoding='utf-8'):
:return:
:rtype: bytes
"""
return str(self).encode(encoding)
return str(self).encode(encoding, 'replace')


class CharsetNormalizerMatches:
Expand Down

0 comments on commit d2fac2c

Please sign in to comment.