亂碼問題歸根結底是編碼問題,寫入檔案編碼和讀取檔案編碼,處理好即可
讀取檔案自定義編碼
fis = new FileInputStream(file);
isr = new InputStreamReader(fis,"utf-8");
br = new BufferedReader(isr);
寫入檔案自定義編碼
fos = new FileOutputStream(file);
pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos,"utf-8")));
以上處理即可解決編碼問題!!!!!!!!!!!!