写入日文xml文档出现了乱码的问题
最近在弄xml文档读写
要操作的是日英双语的xml文档
FileOutputStream outStream = new FileOutputStream(inFile);
OutputStreamWriter outWriter = new OutputStreamWriter(outStream);
((XmlDocument) doc).write(outWriter, "Shift-JIS ");
outWriter.close();
outStream.close();
现在出现的问题是我用UTF-8,Shift-JIS都试过了,读取修改再输出(覆盖原文件),原来正常的日文就变乱码了,请教一下有经验的达人。谢谢。
------解决方案--------------------应该一直为UTF-8!
用editplus编辑看看就知道了!