We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60fcb1b commit 610e380Copy full SHA for 610e380
1 file changed
src/pkgcheck/utils.py
@@ -91,7 +91,7 @@ def is_binary(path, blocksize=1024):
91
92
# guess character encoding using chardet
93
detected_encoding = chardet.detect(byte_str)
94
- if detected_encoding['confidence'] > 0.6:
+ if detected_encoding['confidence'] > 0.8:
95
try:
96
byte_str.decode(encoding=detected_encoding['encoding'])
97
decodable = True
@@ -101,6 +101,6 @@ def is_binary(path, blocksize=1024):
101
# finally use all the checks to decide binary or text
102
if decodable:
103
return False
104
- if is_likely_binary or b'\x00' in byte_str or b'\xff' in byte_str:
+ if is_likely_binary or b'\x00' in byte_str:
105
return True
106
0 commit comments