Java FileWriter 写UTF-8

Java FileWriter 写UTF-8

 

try {
            OutputStreamWriter out 
= new OutputStreamWriter(new FileOutputStream(path),"UTF-8");
            out.write(common
+"\n");
            out.write(html);
            out.flush();
            out.close();
        }
catch (Exception   e) {}

你可能感兴趣的:(Java FileWriter 写UTF-8)