Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect detection of TIS-620 instead of UTF-8 #33

Closed
ulyashin opened this issue Jul 14, 2017 · 0 comments
Closed

Incorrect detection of TIS-620 instead of UTF-8 #33

ulyashin opened this issue Jul 14, 2017 · 0 comments

Comments

@ulyashin
Copy link

cchardet incorrectly detects TIS-620 encoding for some UTF-8 encoded cyrillic strings:

>>> cchardet.__version__
'2.1.1'

>>> cchardet.detect(u"тест".encode("utf-8"))
{'confidence': 0.9900000095367432, 'encoding': u'TIS-620'}
>>> cchardet.detect(u"тост".encode("utf-8"))
{'confidence': 0.9900000095367432, 'encoding': u'TIS-620'}

>>> chardet.__version__
'3.0.4'
>>> chardet.detect(u"тест".encode("utf-8"))
{'confidence': 0.938125, 'language': '', 'encoding': 'utf-8'}
>>> chardet.detect(u"тост".encode("utf-8"))
{'confidence': 0.938125, 'language': '', 'encoding': 'utf-8'}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants