Answer the question
In order to leave comments, you need to log in
How to determine the encoding of a javascript string?
There is an input to select a file. Get a string from a file in a script
var file = document.getElementById('upload').files[0];
Answer the question
In order to leave comments, you need to log in
1. Check the encoding of the file itself in which you write the script. Set utf-8 without BOM
2. Check the encoding in the browser. Put this one.
3. If you use a server (for example Apache), look at what is in the configuration file. Set it to utf-8.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question