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

BUG: Incorrect Encoding Detection as Big5 #102

Open
dxdc opened this issue Aug 27, 2024 · 1 comment
Open

BUG: Incorrect Encoding Detection as Big5 #102

dxdc opened this issue Aug 27, 2024 · 1 comment

Comments

@dxdc
Copy link

dxdc commented Aug 27, 2024

OS/Arch

macOS

Python version

python 3.11

cChardet version

2.1.7

What is the problem?

cChardet is incorrectly detecting the encoding of this file as Big5. I'm not sure if the issue should be posted here or elsewhere.

import cchardet as chardet

with open('abc_1.csv', 'rb') as f:
    result = chardet.detect(f.read())
print(result)
# result:
{'encoding': 'BIG5', 'confidence': 0.9900000095367432}

Expected behavior

  • The correct encoding should be one of the Windows encodings (Windows-1250, 1251, or 1252).

Actual behavior

  • It is detecting the encoding of this file as Big5.

Steps to reproduce the behavior

  • Use cChardet to detect the encoding of the provided CSV file.
  • The encoding is incorrectly detected as Big5.

** Attached file

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

No branches or pull requests

2 participants
@dxdc and others