normalize-charset

Normalize charset

Usage no npm install needed!

<script type="module">
  import normalizeCharset from 'https://cdn.skypack.dev/normalize-charset';
</script>

README

Normalize Charset

Travis npm

Map charset to its normalized form, for example UTF8 to UTF-8.

Motivation

Encoding is a big thing. Terms like UTF8, UTF16 are widely used, but not exist according to RFC 5987.

This module is to solve problems like Error: unsupported charset "UTF8".

Installation

npm install normalize-charset

Use as an express middleware

app.use(require('normalize-charset'))

Use to patch content-type

require('normalize-charset').patchContentType()

content-type is used to parse charset by body-parser