# What changed in chardet

> 37 changes in chardet 7 from its official release notes, upgrade guides and advisories: 8 breaking, 1 deprecations, 1 security, 1 new APIs and options. Each one cited. Sources checked 2026-10-28. HTML: https://unstale.sh/pypi/chardet/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## chardet 7

### Breaking changes

- is_multibyte_cjk is the new name for the EncodingInfo field previously named is_multibyte. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- Markup declarations follow the WHATWG prescan: comments and unrelated attributes no longer supply the charset, while quoted or spaced content charsets work. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- Compiled builds now require both the mypyc and custom build hooks to be enabled. (7.6.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.6.0)
- Low-confidence rare-language winners yield to near-tied mainstream candidates; rare-language labels on inputs under 128 bytes need a 0.03 lead. (7.6.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.6.0)
- Statistical ties no longer resolve according to candidate enumeration order. (7.6.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.6.0)
- UTF-7 detection now requires the whole buffer to decode as UTF-7, and a lone shifted character must fall in a plausible script range. (7.6.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.6.0)
- The BOM stage recognizes the four UTF-7 signature prefixes when the rest of the buffer decodes as UTF-7. (7.6.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.6.0)
- Valid multi-byte UTF-8 now wins over a conflicting charset declaration. (7.5.1) — [release notes](https://github.com/chardet/chardet/releases/tag/7.5.1)

### Security

- The cache is capped at 1024 entries because charset names can come from untrusted markup. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)

### Deprecations

- is_multibyte is deprecated with a DeprecationWarning and will be removed in 8.0; use is_multibyte_cjk instead. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)

### New APIs and options

- The new -m/--mime-type flag shows the MIME type next to the encoding. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)

### Performance

- Large max_bytes values no longer make detection slow; evidence gathering stops at a 256 KiB cap, while UTF-8 validation and the final decode still read the whole window. Default calls are unchanged. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- Compiled wheels use a small Cython kernel alongside mypyc for bigram scoring; the pair is 4.7x faster than the pure wheel on CPython 3.14, with bit-identical output. (7.6.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.6.0)

### Behavior and default changes

- Visual-order Hebrew is now detected. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- Every bigram model was retrained on a refreshed, deduplicated corpus, changing the models used for detection. (7.6.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.6.0)
- Confusion-group resolution now uses per-occurrence votes, word-shape demotions, and an art-model exemption; tied pairs are compared only under language models both encodings have. (7.6.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.6.0)
- A new ANSI-art model supports detection of text-mode art encoded as cp437. (7.6.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.6.0)

### Fixes and other changes

- The deprecated chardet.equivalences shim has been fixed. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- Input cut exactly at the byte cap is no longer mistaken for the whole stream. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- cp864 Arabic is trained on contextually shaped text in visual order, matching how real cp864 systems stored it. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- Every answer now decodes the examined window under the returned encoding name, preventing confident detections that would fail when the rest of the window is decoded. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- The ranking of detect_all() results has been fixed. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- EBCDIC XML MIME types have been fixed. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- Null-separated records like find -print0 output no longer come back as UTF-16-LE with Chinese as the language. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- Cookie resolution now matches tokenize.detect_encoding, including when a line-2 cookie counts. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- With prefer_superset=True, chardet no longer substitutes a code page that cannot decode the data and now respects include_encodings and exclude_encodings. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- Language labels on Unicode text are less likely to favor accent-heavy languages; a French paragraph with a few accents no longer comes back as Hungarian. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- Input cut exactly at the byte cap is no longer mistaken for the whole stream. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- BOM-bearing UTF-32 is no longer detected as UTF-16 when max_bytes cuts a code unit. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- Mostly-ASCII Windows-1252 and English text with a lone accented character no longer receive the cited incorrect encoding labels. (7.7.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.7.0)
- CPython 3.15, including its free-threaded build, is now supported. (7.6.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.6.0)
- When the winning candidate's only multi-byte evidence is an incomplete trailing sequence, a candidate that decodes the complete input wins; genuinely truncated data keeps its answer. (7.6.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.6.0)
- EBCDIC text is now visible to early pipeline stages, and the last two EBCDIC sibling misdetections are fixed. (7.6.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.6.0)
- Training normalization gaps that starved ISO-8859-16 and 26 pre-euro encodings at their distinguishing bytes are fixed. (7.6.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.6.0)
- Statistical scoring skips repeated-whitespace bigrams, fixing space-padded text and windows-1251 logs being misdetected. (7.6.0) — [release notes](https://github.com/chardet/chardet/releases/tag/7.6.0)
- Byte order for BOM-less UTF-16 is now chosen by decoding both ways and comparing text quality. (7.5.1) — [release notes](https://github.com/chardet/chardet/releases/tag/7.5.1)
- CP932 and CP949 promotion now fires when the reported name cannot decode the data but the superset can. (7.5.1) — [release notes](https://github.com/chardet/chardet/releases/tag/7.5.1)
