csv文件默认编码为ANSI,这里出现乱码主要是编码不一致问题 DataInputStream in = new DataInputStream(new FileInputStream(new File("d:\\*.csv")));
BufferedReader br= new BufferedReader(new InputStreamReader(in,"GBK"));//这里如果csv文件编码格式是utf-8,改成utf-8即可
本文共 272 字,大约阅读时间需要 1 分钟。
BufferedReader br= new BufferedReader(new InputStreamReader(in,"GBK"));//这里如果csv文件编码格式是utf-8,改成utf-8即可
转载于:https://www.cnblogs.com/yang1314/p/9645227.html