normalize-charset
v0.2.2
Published
Normalize charset
Downloads
4
Readme
Normalize Charset
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