utf-8 和 gbk 有什么关系吗? 用io流复制文件的时候为什么用 utf-8效果比 gbk 好 ?
代码如下:
BufferedReader br = null;
BufferedWriter bw = null;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(readStr),"utf-8"));
bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(writeStr),"utf-8")); |
|