0

I create a simple application with Javascript in html file. I have a file with french words in UTF-8. I want to read them. But instead of é and other spec. french symbols I have a '?' symbols. Whats wrong? allText variable contains '?' symbols, but KWrite and GEdit says that it is UTF-8 and show all word correctly.

function loadWordListFromFile (fileName){
$.ajax({type: 'GET', encoding:"UTF-8", url: fileName, dataType: 'text', contentType: "text/plain; charset=UTF-8", success: function(data) {
        processData(data);//!
        $('#Outline').show();
    }});

function processData(allText) {
    initWordList();
    var allTextLines = allText.split(/\r\n|\n/);
    for (var i = 0; i < allTextLines.length; ++i){
        wordList[allTextLines[i].length].push(allTextLines[i]);
    } 
    setTimeout('continueLoading()', 3000);

}
}
Sacha_D
  • 68
  • 1
  • 10
  • please refer to this link: http://stackoverflow.com/questions/8332500/module-request-how-to-properly-retrieve-accented-characters – Bowen Yang Dec 08 '16 at 19:49
  • I included in index.html: [code] [/code] And I have got "ReferenceError: require is not defined". I can use this only in browser side. What I do wrong? – Sacha_D Dec 09 '16 at 06:30
  • And I haven't problems with russian characaters. – Sacha_D Dec 09 '16 at 09:13

0 Answers0