# charset-detector

> ICU based port of charset detection

Latest version **0.0.2** (published 2014-10-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install charset-detector
pnpm add charset-detector
yarn add charset-detector
bun add charset-detector
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2014-10-22 |
| First published | 2014-10-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/charset-detector) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Denis Bardadym |
| Maintainers | btd |
| Keywords | icu, charset, detection |

## Links

- npm: https://www.npmjs.com/package/charset-detector
- Repository: https://github.com/btd/node-charset-detector
- Issues: https://github.com/btd/node-charset-detector/issues
- npm.io page: https://npm.io/package/charset-detector

## Recent versions

- 0.0.2 (latest) — 2014-10-22
- 0.0.1 — 2014-10-22

## README

node-charset-detector
=====================

ICU based port of charset detection to javascript

Install
=======

```
npm install --save charset-detector
```

Use
===

```javascript
var detect = require('charset-detector');

/*
  function accept node Buffer, but will work with anything that follow such rules:
  allow indexing by []
  has .length
  each numbered property is byte 0-255
*/
var matches = detect(buffer);

```

Function will return array of matches sorted by most confident first.

Detectable encodings from ICU:

* UTF8 (with and without BOM)
* UTF16-LE, UTF16-BE, UTF32-LE, UTF32-BE
* Big5, EUC-JP, GB18030, Shift_JIS
* ISO-2022-JP, ISO-2022-KR, ISO-2022-CN
* ISO-8859-1, ISO-8859-2, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-8-I, ISO-8859-9, windows-1250, windows-1251, windows-1252, windows-1253, windows-1254, windows-1255, windows-1256, koir8-r, IBM420\_ltr(rtl), IBM424\_ltr(rtl)

---
_Source: https://npm.io/package/charset-detector · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
