Skip to content
This repository has been archived by the owner on Jan 2, 2018. It is now read-only.

btd/node-detect-encoding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  • MacPorts
sudo port install icu

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)
});

About

Detect buffer encoding with ICU. NOT SUPPORTED use charset-detector

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published