I am having some issues while trying to parse some date from a .csv file using javascript. The issue is simply that some characters appear strangely, as they are country specific and only used in Scandinavia. I have seen several people answer how to fix encoding when creating a .csv with javascript, but I can't make it work when extracting data. This is some of what I have tried:
var fileInput = document.getElementById('fileInput');
var reader = new FileReader();
reader.onload = function () {
var data = reader.result;
var BOM = "\uFEFF";
var csvContent = BOM + csvContent;
}
};
reader.readAsBinaryString(fileInput.files[0]);