写数据到本地文件时,应该先确定字符集

可以这样写:

Writer writer = new OutputStreamWriter(new FileOutputStream(file),"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.