I'm working on a project that uses FileReader.readAsText() and chances are high that users all over the world may use different encoding rather than "UTF-8", gb2312, big5, etc.
To prevent strange symbols resulted from decoding error, I use this:
reader.readAsText(file, “gb2312”);
But not everyone use that encoding. Is there a better solution that works for all? Well in python, I can use chardet.