有没有办法用Java检查.txt文件的charset编码?

Zoo*_*key 7 java unicode utf-8 character-encoding file-encodings

有没有办法检查用Unicode编码的文本文件(.txt)或用Java编写的UTF-8?

Pau*_*ime 10

你绝对不能确定在一般情况下使用哪种字符集.我发现这是一个很好的阅读.

http://illegalargumentexception.blogspot.co.uk/2009/05/java-rough-guide-to-character-encoding.html

特别是自动检测编码部分.