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);
}
}