I\'ve been having an issue getting the java.util.Scanner to read a text file I saved in Notepad, even though it works fine with others. Basically, when it tries to read the
Some time ago I had similar problem with configuration file which was edited by the user. Because I never know what type of editor user will use I try this:
org.mozilla.universalchardet.UniversalDetector
available from here:
https://code.google.com/p/juniversalchardet/
The detecting char encoding is not simple thing so I can't be sure if this library works at any condition, but for me was sufficient. Have a look, maybe will help somehow to detect your encoding and later set it to Scanner.