ruchardet
Module detects encoding (cp866
, cp1251
or utf8
) of text.
Installation
npm i ruchardet
Usage
const ruchardet = require('ruchardet')
const buffer = Buffer.from('тест')
const encoding = ruchardet.detect(buffer)
console.log(encoding) // prints utf8