I need to read a file containing a group of characters moved in an ASCII 65 table. This means that for each character I have to do:
String.fromCharCode('Β’'.charCodeAt(0)-65)
But it doesnβt work at all. I asked my friends to do a test using Python by entering the same file, and they got the correct result.
When I try to do the same job with the Chrome file system, it doesn't work at all. I cannot return the expected characters. I think this is a problem with my encoding / encoding board, but I cannot figure out what and how to fix it.
I tried to open the file with a different encoding:
var reader=new FileReader();
reader.readAsText(file, 'windows-1252');
reader.readAsText(file, 'ISO-8859-2');
Appreciate any help
source
share