50,528
社区成员
发帖
与我相关
我的任务
分享
public class Test {
public static void main(String[] args) throws IOException {
FileInputStream fileReader = new FileInputStream(new File("C:\\Users\\ding\\Desktop\\a.txt"));
InputStreamReader gbk = new InputStreamReader(fileReader, "gbk");
int i;
while ((i = gbk.read()) != -1) {
System.out.println((char)i);
}
fileReader.close();
}
}