[jdom-interest] how to specify encoding when using JDOMSource and TraX
Frank Sauer
Frank.Sauer at trcinc.com
Mon Oct 7 14:45:47 PDT 2002
When running the following code:
StreamSource s = getXSL();
Transformer transformer = null;
synchronized(TFactory) {
transformer = TFactory.newTransformer(s);
}
Document doc = new Document();
doc.setRootElement(dataXML);
JDOMResult result = new JDOMResult();
JDOMSource source = new JDOMSource(doc);
transformer.transform(source, result);
Note that dataXML is a JDOM Element obtained from database data.
It was never read from an XML file.
I occasionaly get the error:
'bad continuation of multi-byte UTF-8 sequence (character code: 0x63)'
when using Saxon 6.5.1 and a JDOMSource.
My question is: where do I specify that the input xml is iso-8859-1
and not utf-8 (even though I think it is, I'm just trying to make this
error go away...)
Thanks,
Frank
More information about the jdom-interest
mailing list