PDA

View Full Version : javascript - reading local text file - charset issue



kkris1983
26 Apr 2012, 9:20 AM
Hi,


I am reading local text file using input-type-file and FileReader.readAsText(). The problem arises when the local text file contains characters like . In that case it is converted to . Of course I can set encoding manually to iso8859-1 as a parameter of FileReader.readAsText(File, encoding) but the thing is that I have no clue what kind of encoding user has set on his side.


My question is whether there is an option to determine encoding on client machine ?


Best regards
kkris1983

mitchellsimoens
1 May 2012, 7:09 AM
You will need to google this, this is not an Ext JS question.