--- id: cchardet version: "2.1.7" license: Mozilla Public License license_treatment: copyleft maintenance: aging --- # cchardet — cChardet is high speed universal character encoding detector. License: copyleft · Maintenance: aging · Downloads: 8.4M/mo ## What it is and what it does cchardet is a high-speed character encoding detector that identifies the encoding of raw byte strings by analyzing statistical patterns. It wraps the C library uchardet and supports a wide range of international encodings including UTF-8, UTF-16, CJK variants (Big5, EUC-JP, Shift-JIS, GB18030, etc.), Cyrillic, Arabic, and many European single-byte encodings. The package provides a simple API: call detect() on a byte buffer to get back a dictionary with the detected encoding and language hint. The main use case is preprocessing text data when the source encoding is unknown—common in web scraping, log parsing, and data import workflows. It has no runtime dependencies and installs via prebuilt wheels on most platforms. However, the project is aging: the last release was 2020-10-27, and while the repository remains active, there have been no new package versions for over four years. The copyleft license (Mozilla Public License) requires careful review if you plan to distribute derived works. Use it for: - Detect encoding of downloaded web pages or API responses before parsing. - Identify encoding of legacy log files or CSV imports with unknown character sets. - Preprocess user-uploaded text files to normalize encoding before storage. - Batch-process mixed-encoding document collections to extract text reliably. - Auto-detect encoding in text processing pipelines to avoid manual charset specification. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. cchardet detects the character encoding of byte strings using a C binding to uchardet, supporting dozens of international encodings and languages with high speed. Yes, if you need fast encoding detection and can accept the aging codebase. The package is stable with no known vulnerabilities, but the lack of updates since 2020-10-27 means it may not support newer Python versions or benefit from recent uchardet improvements. Use it for production workloads where encoding detection is a bottleneck and you are comfortable pinning to version 2.1.7; monitor the repository for future releases or evaluate alternatives if you require active maintenance. ## Install pip install cchardet uv add cchardet poetry add cchardet ## Installing cchardet Before you install: Medium install friction due to compiled C extensions; prebuilt wheels are available for Python 3.6–3.9 on Windows, Linux, and macOS x86_64/i686, but the package is aging—last release was 2020-10-27 and no updates in over four years despite an active repository. License in practice: Licensed under Mozilla Public License (copyleft), with dual licensing also under GPL and LGPL per classifiers. Copyleft terms require derivative works to be distributed under compatible terms; review your project's license compatibility before use. Quickstart: import cchardet with open('file.txt', 'rb') as f: result = cchardet.detect(f.read()) print(result) Requires a C compiler and build tools at install time; prebuilt wheels are available for common platforms but not all architectures. Verify before relying: - Whether the package remains compatible with Python 3.10+ despite no official release since 2020. - Current performance relative to modern encoding detectors in production workloads. - Whether the underlying uchardet library has received security or accuracy updates since the last cchardet release. - Confidence score range and interpretation for detect() results. ## Package facts - License: Mozilla Public License (copyleft) - Python support: unspecified - Install friction: medium - Maintenance: aging - Downloads: 8.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags character encoding detection, charset detection, detect text encoding, unicode encoding identifier, fast encoding detector, language encoding identifier, byte string encoding, international charset support, encoding-detection, character-encoding, text-preprocessing [View on SkillFed](https://skillfed.io/packages/cchardet) · [View on PyPI](https://pypi.org/project/cchardet/)