UNPKG

detect-file-encoding-and-language

Version:

Charset Detector - Detect the encoding and language of text files - Use it in the browser, with Node.js, or via CLI

9 lines 235 B
module.exports = (content) => { for (let b = 0; b < content.length; b++) { // If ? is encountered it's definitely not utf8! if (content[b] === "�") { return false; } } return true; }