# buffer-encoding

> Convert buffers across different encodings, with encoding detection support.

Latest version **0.0.2** (published 2015-09-17) · 0 weekly downloads

## Install

```sh
npm install buffer-encoding
pnpm add buffer-encoding
yarn add buffer-encoding
bun add buffer-encoding
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2015-09-17 |
| First published | 2015-09-15 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | fritx |

## Links

- npm: https://www.npmjs.com/package/buffer-encoding
- Repository: https://github.com/fritx/buffer-encoding
- Homepage: https://github.com/fritx/buffer-encoding#readme
- Issues: https://github.com/fritx/buffer-encoding/issues
- npm.io page: https://npm.io/package/buffer-encoding

## Dependencies (2)

- [encoding](https://npm.io/package/encoding.md) ^0.1.11
- [jschardet](https://npm.io/package/jschardet.md) ^1.3.0

## Recent versions

- 0.0.2 (latest) — 2015-09-17
- 0.0.1 — 2015-09-15

## README

# buffer-encoding

Convert buffers across different encodings, with encoding detection support.

Built on top of [encoding](https://github.com/andris9/encoding) and [jschardet](https://github.com/aadsm/jschardet).

```js
var convert = require('buffer-encoding').convert

var buf = convert(someBuf, 'gb2312', 'utf8') // utf8 => gb2312
var buf = convert(someBuf, 'utf8', 'gb2312') // gb2312 => utf8

var buf = convert(someStr, 'utf8', 'gb2312') // or string input instead

var buf = convert(someBuf, 'utf8') // even with encoding detection
var buf = convert(someBuf) // whatever => utf8
```

```plain
convert(bufferOrString, [toEncoding], [fromEncoding])
```

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