Skip to content

Commit 6155b6b

Browse files
authored
⚡ Remove useless call to decode in fn is_unprintable (#206)
1 parent f1303ae commit 6155b6b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

charset_normalizer/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def is_unprintable(character: str) -> bool:
206206
character.isspace() is False # includes \n \t \r \v
207207
and character.isprintable() is False
208208
and character != "\x1A" # Why? Its the ASCII substitute character.
209-
and character != b"\xEF\xBB\xBF".decode("utf_8") # bug discovered in Python,
209+
and character != "\ufeff" # bug discovered in Python,
210210
# Zero Width No-Break Space located in Arabic Presentation Forms-B, Unicode 1.1 not acknowledged as space.
211211
)
212212

0 commit comments

Comments
 (0)