2.2.0
What’s changed
- Support Python 3.11, 3.12, 3.13, and 3.14; drop Python 3.10 and earlier
- Modernize development, testing, and packaging around
uv, current Cython, and current packaging standards - Update the maintained PyYoshi/uchardet fork while preserving the cChardet-compatible API
- Improve UTF-8 validation and GB18030 candidate ranking
- Return language and confidence information from detection APIs
- Add
detect_all()for ranked encoding and language candidates - Add optional language weights to the Python API and CLI
- Accept
bytes,bytearray, andmemoryview; addmax_bytesto bound detection work - Stream input in
cchardetect, with JSON output and configurable chunk and byte limits - Expose early-completion state and safely handle inputs larger than uchardet’s internal 32-bit length
- Ship PEP 561 type information
- Add reproducible performance and accuracy comparisons, native sanitizer coverage, arbitrary-byte consistency tests, and installed-wheel smoke tests
- Build and test supported Python versions on Linux, macOS, and Windows, including ARM64 wheel coverage
See CHANGES.md for the complete release history.