码迷,mamicode.com
首页 > 其他好文 > 详细

输出日文CSV乱码问题

时间:2017-10-30 11:17:10      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:output   写用   问题   div   代码   out   excel打开   code   需要   

直接写用Excel打开时会乱码,需要加上下面代码中注释的三行

fos = new FileOutputStream(file, false);
            //fos.write( 0xef );  
            //fos.write( 0xbb );  
            //fos.write( 0xbf );
            iowriter = new OutputStreamWriter(fos,"UTF-8");
            writer = new CSVWriter(iowriter);

 

输出日文CSV乱码问题

标签:output   写用   问题   div   代码   out   excel打开   code   需要   

原文地址:http://www.cnblogs.com/xpvincent/p/7753048.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!