[jdom-interest] How to avoid setText("€") replacing '&' with '&'

Jason Hunter jhunter at collab.net
Wed Feb 21 20:44:49 PST 2001

> I'm trying to generate an XML file containing the string "&#x20AC".  This is
> the unicode character for the euro currency sign.  Since I'm using FOP
> (http://xml.apache.org/fop) to convert this XML file into PDF, I need this
> "€" literally.
> When outputting this text with setText("€"), the resulting XML file
> contains the text "€" which is not converted into the euro
> currency sign by FOP.

Try setText("\u20ac");


More information about the jdom-interest mailing list