为输出字符流指定编码的办法

java.io.OutputStream out=new java.io.FileOutputStream(fileName);

java.io.Writer wr=new java.io.OutputStreamWriter(out,"UTF-8");  

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.