您需要
InputStreamReader使用
Charset参数指定的编码。
// ↓ whatever the input's encoding isCharset inputCharset = Charset.forName("ISO-8859-1");InputStreamReader isr = new InputStreamReader(fis, inputCharset));这也适用:
InputStreamReader isr = new InputStreamReader(fis, "ISO-8859-1"));
您可以通过运行时获取默认字符集-该字符集来自JVM正在运行的系统
Charset.defaultCharset()。



