sonicdoe / ced

Detect the character encoding using Google’s compact_enc_det library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ced

Detect the character encoding using Google’s compact_enc_det library

npm CI

Installation

$ npm install ced

In order to build ced, you may need to install some build tools first. Check node-gyp’s readme for more information.

Usage

const fs = require('fs')
const ced = require('ced')

const fileBuffer = fs.readFileSync('foo.txt')
const encoding = ced(fileBuffer)

console.log(encoding)
// 'UTF8'

License

ced is licensed under the ISC License, compact_enc_det is licensed under the Apache License 2.0. See LICENSE for the full license text.

About

Detect the character encoding using Google’s compact_enc_det library

License:Other


Languages

Language:C++ 70.0%Language:JavaScript 23.2%Language:Python 6.8%