You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Through analysis: guess in the universaldetector.py file, judge the branch has objections
If we're checking non-CJK encodings, use single-byte prober
If self.lang_filter & LanguageFilter.NON_CJK:
self._charset_probers.append(SBCSGroupProber())
Self._charset_probers.append(Latin1Prober())
(The above 4 lines are the code)
I am not sure that it is caused by some reason, or it is a bug. Please give me a solution to this problem. Thank you
The text was updated successfully, but these errors were encountered:
Use the chardet.detect(data) function to check the iso-8859-9-turkish file encoding
Test steps:
#!/usr/bin/python
import sys
import chardet
path = str(sys.argv[1])
f = open(path,'rb')
data = f.read()
s= chardet.detect(data)
print(s)
{'confidence': 0.73, 'language': '', 'encoding': 'ISO-8859-1'}
The above result is obviously not "ISO-8859-9"
Desired result:
[root@localhost iso-8859-9-turkish]# ./chardet_test.py divxplanet.com.xml
{'confidence': 0.53159569353908, 'language': 'Turkish', 'encoding': 'ISO-8859-9'}
Through analysis: guess in the universaldetector.py file, judge the branch has objections
If we're checking non-CJK encodings, use single-byte prober
If self.lang_filter & LanguageFilter.NON_CJK:
self._charset_probers.append(SBCSGroupProber())
Self._charset_probers.append(Latin1Prober())
(The above 4 lines are the code)
I am not sure that it is caused by some reason, or it is a bug. Please give me a solution to this problem. Thank you
The text was updated successfully, but these errors were encountered: