3.5.3 (2026-11-23)
Changed
- Faster noise scoring in both the pure-Python and Cython implementations by reusing
Unicode character properties. The Cython extensions also speed up language ranking
and checks for suspicious transitions between Unicode blocks. - Reduced detection overhead by skipping redundant UTF-8 sample alignment checks and
repeated logging checks when tracing is disabled. - Raised the setuptools upper bound to
<84.3, allowing source builds with setuptools
84.1 and 84.2. (#828)
Fixed
- Fixed detection of registered multibyte codecs when a sample boundary splits a character.
The detector now strictly decodes the full input with the custom codec before sampling
the resulting text. - Kept single-byte candidates in consideration when a Chinese, Japanese or Korean
decoding has measurable noise and no matching language. - Recognized ASCII information separators (
0x1Cthrough0x1F) as whitespace when
scoring text, including record-separated JSON. (#821) - Removed the leading GB18030 signature from lazily decoded matches on large inputs. (#820)
- Fixed UTF-7 text with a signature being misidentified as ASCII when a sample
started in the middle of a long encoded sequence. (#839) - Fixed language detection returning names such as
English—when only an alternative
language profile met the coherence threshold. (#823) CharsetMatch.output()now updates a UTF-8 declaration when transcoding to another
encoding and preserves the last successful output if a later conversion fails. (#819, #814)- The legacy
detect()function now reportsISO-8859-1for Latin-1 by default. (#813) - Both
python -m charset_normalizerandpython -m charset_normalizer.clinow
propagate the CLI exit status. (#817) - CLI JSON output with
--with-alternativenow always uses a top-level array,
including for a single result or a file with no match. (#822) normalizer --normalizenow appends the detected encoding to extensionless
filenames when creating a copy (for example,READMEbecomesREADME.cp1252). (#838)- Excluded Python 3.16's
utf_7_imapmailbox codec from detection to prevent
errors when probing unrelated encodings. (#825)