# What changed in chardet

> 4 changes in chardet 2 from its official release notes, upgrade guides and advisories: 1 security, 2 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/chardet/

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

## chardet 2

### Security

- Buffer allocation was made safer. (2.1.1) — [release notes](https://github.com/runk/node-chardet/releases/tag/v2.1.1)

### New APIs and options

- Adds detection support for windows-1257. (2.2.0) — [release notes](https://github.com/runk/node-chardet/releases/tag/v2.2.0)
- Adds detection support for windows-1258. (2.2.0) — [release notes](https://github.com/runk/node-chardet/releases/tag/v2.2.0)

### Fixes and other changes

- Sample size handling was fixed. (2.1.1) — [release notes](https://github.com/runk/node-chardet/releases/tag/v2.1.1)
