Commit 36963113 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed encoding problem while saving config file. JM-518

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3296 b35dd754-fafc-0310-a699-88a17e54d16e
parent 03b6a00b
......@@ -452,11 +452,8 @@ public class XMLProperties {
Writer writer = null;
try {
tempFile = new File(file.getParentFile(), file.getName() + ".tmp");
writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tempFile), "UTF-8"));
OutputFormat prettyPrinter = OutputFormat.createPrettyPrint();
prettyPrinter.setEncoding("UTF-8");
XMLWriter xmlWriter = new XMLWriter(writer, prettyPrinter);
xmlWriter.write(document);
writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tempFile)));
writer.write(document.asXML());
}
catch (Exception e) {
Log.error(e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment