[jdom-interest] SAXBuilder.setExpandEntities

Alex Rosen arosen at silverstream.com
Thu May 16 08:00:16 PDT 2002


> >Problem is that when the document is stored, the character
> entities have been
> >interpreted by JDOM and are replaced with '?' question marks
> in the file. So
> >we never get back what we originally sent. All character entities are
> >replaced by question marks. Pehaps special characters should
> be replaced by
> >character entities by the XMLOutputter then?
> >
>
> Indeed they should be. If that's not happening then it's a bug. It
> could well be a bug in JDOM, but it's also possible it's a bug in
> your code. In particular if you're using a Writer for the output
> rather than an OutputStream, JDOM can't figure out which characters
> it needs to escape because there's no way to determine the underlying
> encoding of the Writer.

... or the file is being stored correctly, but you're viewing it using an
incorrect encoding, or with a font that doesn't support those characters.
Well, I don't know if those things would result in question marks
specificly, but they could cause the file to look wrong in some way when it
really isn't.

Alex




More information about the jdom-interest mailing list