2

When I'm getting this page http://booking.airasia.com/css/AKBase/Cultures/en-GB/far-min.css with node's http, the toString method gives me corrupt stuff. Apparently that page is in UTF-16, but there is no mention of that fact in headers. Firefox however has no problems guessing the encoding, is this something node can do?

(I know I can convert this specific page, since I know its encoding now, but I want to guess the encoding)

1
  • Try using the request module. It may have some logic in it to guess encoding. Commented Feb 5, 2014 at 18:40

1 Answer 1

3

An ex-colleague of mine ported python chardet to javascript: https://github.com/aadsm/jschardet

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.