detect-encoding

0.0.3 • Public • Published

Detect encoding name with ICU

Installation

Install libicu.

In your $PATH icu-config should be available.

npm install detect-encoding

Ubuntu

apt-get install libicu-dev

OSX

  • Brew
brew install icu4c
export PATH=$PATH:/usr/local/Cellar/icu4c/52.1 #take a look which version you have

Usage

Simple usage

var detectEncoding = require("detect-encoding");
 
var buffer = fs.readFileSync("/path/to/the/file");
var charset = detectEncoding(buffer, function(err, result) {
    console.log(result)
});

Readme

Keywords

Package Sidebar

Install

npm i detect-encoding

Weekly Downloads

1

Version

0.0.3

License

none

Last publish

Collaborators

  • btd