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 { ...@@ -452,11 +452,8 @@ public class XMLProperties {
Writer writer = null; Writer writer = null;
try { try {
tempFile = new File(file.getParentFile(), file.getName() + ".tmp"); tempFile = new File(file.getParentFile(), file.getName() + ".tmp");
writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tempFile), "UTF-8")); writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tempFile)));
OutputFormat prettyPrinter = OutputFormat.createPrettyPrint(); writer.write(document.asXML());
prettyPrinter.setEncoding("UTF-8");
XMLWriter xmlWriter = new XMLWriter(writer, prettyPrinter);
xmlWriter.write(document);
} }
catch (Exception e) { catch (Exception e) {
Log.error(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