Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHIFT-JIS not detected in this case #30

Open
bpasero opened this issue Mar 29, 2017 · 1 comment
Open

SHIFT-JIS not detected in this case #30

bpasero opened this issue Mar 29, 2017 · 1 comment

Comments

@bpasero
Copy link
Contributor

bpasero commented Mar 29, 2017

Detect attached file. The result will be windows-1252

shift-jis.txt

image

@jyrkive
Copy link

jyrkive commented Dec 29, 2020

Another sample file. This is Shift-JIS encoded but is being detected as ISO-8859-2, at about 74 % confidence level.

particle_sakura.txt

Here's code I used to get the raw data into a string jschardet accepts (array is an UInt8Array):

const decoder = new TextDecoder("latin1");
const text = decoder.decode(array);
const encoding = jschardet.detect(text);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants