Skip to content

arniu/normalize-charset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Normalize Charset

npm Travis Greenkeeper

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