Skip to content

Commit

Permalink
🐛 Fix very rare case of ?bad? characters that cannot be translated to…
Browse files Browse the repository at this point in the history
… Unicode
  • Loading branch information
Ousret committed May 13, 2021
1 parent 523c71b commit 702735d
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 702735d

Please sign in to comment.