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

about auto detect charset #19

Closed
6api opened this issue Aug 22, 2017 · 1 comment
Closed

about auto detect charset #19

6api opened this issue Aug 22, 2017 · 1 comment

Comments

@6api
Copy link

6api commented Aug 22, 2017

this is worked fine :
var b = encoding.convert(name, 'utf8', 'gbk');
console.log(b.toString());

this not worked:
var b = encoding.convert(name, 'utf8');
console.log(b.toString());

but i must know name is gbk, is any way to detect name charset?

@dchebakov
Copy link

For encoding auto-detection, you can use jschardet library. It works well both in the browser and NodeJs.

@andris9 andris9 closed this as completed Jul 10, 2020
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

3 participants