Character encocing

When writing to the file, I was using Writer. The solution is switching to OutputStream.

From JDOM reference, org.jdom2.output.XMLOutputter, output(Document doc, java.io.Writer out):
Warning: using your own Writer may cause the outputter's preferred character encoding to be ignored. If you use encodings other than UTF-8, we recommend using the method that takes an OutputStream instead.

Technology:

Subscribe to Character encocing