[jdom-interest] Writing foreign languages to XML
noamt at yahoo.com
Fri Apr 12 03:53:58 PDT 2002
--- David Treves <dtreves at fastmail.fm> wrote:
> I am trying to write Hebrew content into an XML file using JDOM (last
> Beta version) and it keeps come out as "??? ???" wherever there is a
> Hebrew character.
> Is there some setting I should set in order to use non-English
For using Hebrew with XML you can choose between at least 3
iso-8859-8, UTF-8, and UTF-16. All work very well with Hebrew
characters. The iso-8859-8 encoding has the advantage that
you don't need a Unicode-aware text editor to edit a file
written with that encoding. It has the disadvantage, however,
of limiting the file to contain only Hebrew and ASCII
UTF-8 is the recommended encoding. IIRC It uses 1 byte for
ASCII chars and 2 bytes for any other (including Hebrew).
In your application you have to use the encoding you selected
when constructing the XMLOutputter, and (possibly) when
constructing the Writer.
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
More information about the jdom-interest