Skip to content

Commit

Permalink
⚡ Remove useless call to decode in fn is_unprintable
Browse files Browse the repository at this point in the history
  • Loading branch information
Ousret committed Aug 14, 2022
1 parent f1303ae commit 6101bc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion charset_normalizer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def is_unprintable(character: str) -> bool:
character.isspace() is False # includes \n \t \r \v
and character.isprintable() is False
and character != "\x1A" # Why? Its the ASCII substitute character.
and character != b"\xEF\xBB\xBF".decode("utf_8") # bug discovered in Python,
and character != "\ufeff" # bug discovered in Python,
# Zero Width No-Break Space located in Arabic Presentation Forms-B, Unicode 1.1 not acknowledged as space.
)

Expand Down

0 comments on commit 6101bc7

Please sign in to comment.