标签:
解決BufferedReader读取UTF-8文件中文乱码
File rst01 = new File(context.getRealPath("/")+"zljb0.html");
File rst02 = new File(context.getRealPath("/")+"zljb.html");
InputStreamReader isr = new InputStreamReader(new FileInputStream(rst01), "UTF-8");
BufferedReader reader = new BufferedReader(isr);
OutputStreamWriter writerStream = new OutputStreamWriter(new FileOutputStream(rst02),"UTF-8");
BufferedWriter writer = new BufferedWriter(writerStream);
读写编码需一致
解決BufferedReader BufferedWrite 读写UTF-8文件中文乱码
标签:
原文地址:http://my.oschina.net/airship/blog/410490