Skip to content

BUG: Incorrect Encoding Detection as Big5 #33

@dxdc

Description

@dxdc

OS/Arch

macOS

Python version

python 3.11

cChardet version

2.1.18

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions