标签:
网络上搜索下,发现都不适合
最终改写代码:
FileInputStream fis = null; InputStreamReader isr = null; BufferedReader br= null; try { fis = new FileInputStream(file); isr = new InputStreamReader(fis,"gbk"); br = new BufferedReader(isr); String line1 = null; while ((line1 = br.readLine()) != null) { System.out.println(line1); } br.close(); isr.close(); fis.close(); } catch (Exception e) { e.printStackTrace(); }
FileInputStream fis = null;//针对部门服务器乱码InputStreamReader isr = null;
标签:
原文地址:http://www.cnblogs.com/langdangyunliu/p/5601220.html