Home

Awesome

cChardet

PyPI version Run tests Build Wheels

cChardet is high speed universal character encoding detector. - binding to uchardet.

Supported Languages/Encodings

Example

import cchardet as chardet
with open(r"tests/samples/wikipediaJa_One_Thousand_and_One_Nights_SJIS.txt", "rb") as f:
  msg = f.read()
  result = chardet.detect(msg)
  print(result)

Benchmark

$ python setup.py build_ext -i -f
$ python tests/bench.py

Results

CPU: AMD Ryzen 9 7950X3D

RAM: DDR5-5600MT/s 96GB

Platform: Ubuntu 24.04 amd64

Python 3.12.3

Request (call/s)
chardet v5.2.01.1
cchardet v2.2.0a12263.6

LICENSE

See COPYING file.

Contact

Support Platforms