[jdom-interest] Question regarding encoding

Sinkinson,Andrew [NCR] Andrew.Sinkinson at ec.gc.ca
Thu Oct 7 11:30:43 PDT 2004

  Hi All,

  Why are my French apostrophe being converted to questions marks ?
  If I have the following input Xml document:

  <?xml version="1.0" encoding="ISO-8859-1"?>
    <description>L'architecture de GI/TI </description>

  Parse the document with jdom and write it to the file system with the
following format
  Format format = Format.getCompactFormat().setEncoding("ISO-8859-1");

  XMLOutputter out = new XMLOutputter(format);
  FileWriter f = new FileWriter(new File(filename));
  out.output(doc, f);

  Here is the output:
<?xml version="1.0" encoding="ISO-8859-1"?>
<record><description>L?architecture de GI/TI</description></record>

  Any help would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://servlets.com/pipermail/jdom-interest/attachments/20041007/79ab2b91/attachment.htm

More information about the jdom-interest mailing list