输出日文CSV乱码问题

直接写用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乱码问题)