# html-to-utf8

> Convert html documents of arbitrary encoding to UTF-8

Latest version **0.1.0** (published 2015-10-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install html-to-utf8
pnpm add html-to-utf8
yarn add html-to-utf8
bun add html-to-utf8
```

## 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.1.0 |
| Published | 2015-10-07 |
| First published | 2015-10-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tomasz Szczęśniak-Szlagowski |
| Maintainers | spect88 |
| Keywords | utf8, html, encoding |

## Links

- npm: https://www.npmjs.com/package/html-to-utf8
- Repository: https://github.com/spect88/html-to-utf8
- Homepage: https://github.com/spect88/html-to-utf8#readme
- Issues: https://github.com/spect88/html-to-utf8/issues
- npm.io page: https://npm.io/package/html-to-utf8

## Dependencies (3)

- [charset](https://npm.io/package/charset.md) ^1.0.0
- [jschardet](https://npm.io/package/jschardet.md) ^1.3.0
- [iconv-lite](https://npm.io/package/iconv-lite.md) ^0.4.11

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2015-10-07

## README

# html-to-utf8

A Node.js library for converting HTML documents of arbitrary encoding to UTF-8.

### Installation

```shell
npm install html-to-utf8
```

### Usage

```javascript
var request = require('request');
var toUTF8 = require('html-to-utf8');

request({
  url: 'http://www.rakuten.co.jp',
  encoding: null // stop request from decoding response
}, function(err, resp, buffer) {
  if (err) {
    console.error(err.stack);
    return;
  }

  var htmlInUTF8 = toUTF8(buffer, resp.headers['content-type']);
});
```

### License

The code is available under [MIT license](LICENSE).

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