在使用这个两个流,设置读取文件编码和写入文件编码时,有时候生成的文件会是,设置的编码,但有时候不是,为什么?是只能设置gbk和utf-8吗?如果我想转成繁体怎么办?
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("day21.txt"),"GBK"));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("G:\\bianma.txt"),"utf-8")); |
|