I am trying to import a clients .txt file which will then be turned into a JS array using an AJAX call. The call works fine on Chrome and Safari but when I import the file and console log it in FireFox - I see this result:
If I copy all of the contents of the file and paste it into a new .txt file that I've created, the errors don't display.
Normally this wouldn't be an issue, but the client has roughly 6000 of these .txt files that they would like to use. Is there something I should be putting in my AJAX call to correct these odd character additions?
This is my current code, reduced to core functionality for brevity:
$(document).ready(function () {
$.ajax({
url: "./data/words.txt",
success: function (csvd) {
console.log(csvd);
},
dataType: "text",
complete: function () {
// levelSelect();
}
});
});