aadsm / jschardet

Character encoding auto-detection in JavaScript (port of python's chardet)
GNU Lesser General Public License v2.1
710 stars 97 forks source link

[bug] aBuf.slice(...).split is not a function #94

Closed gowy222 closed 5 months ago

gowy222 commented 5 months ago

pnpm add jschardet var jschardet = require("jschardet")

let encoding2 = jschardet.detect(filename_buffer) //处理各种国产压缩包内部子文件/夹, 在nodejs尝试解压时乱码问题.. console.log('encoding2====', encoding2);

然后就报错:

TypeError: aBuf.slice(...).split is not a function
...node_modules\.pnpm\jschardet@3.1.2\node_modules\jschardet\src\universaldetector.js:187:42)
aadsm commented 5 months ago

Is this still an issue or is it something that got fixed in the meanwhile?