A
A
Andrew2017-02-26 19:03:54
Character encoding
Andrew, 2017-02-26 19:03:54

js how to change string encoding?

Hello.
Always use encoding:
var file = evt.target.files[0];
varreader = new FileReader();
reader.readAsText(file,"CP1251");
reader.onload = function(event) {
var csvData = event.target.result;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Merkushev, 2017-02-26
@Morterset

reader.readAsText(file, 'CP1251') - doesn't help?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question