FileWriter fw =new FileWriter("..\\temp\\1.csv");
for(int i =0 ;i < chkedLines.size()-1; i++){ fw.write(chkedLines.get(i).getUserCode()+","+chkedLines.get(i).getUserName()+",,"+chkedLines.get(i).getEmail()+","+chkedLines.get(i).getRemark()+",\r\n");
}
fw.close();
write方法里有日文老显示乱码,怎么把他的编码方式改为日文啊
------解决方案--------------------
new BufferedWriter(new OutputStreamWriter(new FileOutputStream(...), "ShiftJIS"))
日文是shiftjis吗?
------解决方案--------------------
你用OutputStreamWriter writer=new OutputStreamWriter(
new FileOutputStream("XXX"),"UTF-8"); 试试