[jdom-interest] Writing foreign languages to XML

Bart Read bart at wdi.co.uk
Thu Apr 11 04:43:47 PDT 2002


For Hebrew I think you'll need to use UTF-16 (which I'm assuming JDOM
supports?).
Cheers,
Bart


=================================
Bart Read
Senior Developer
Abbotsbury Software Ltd
Abbotsbury, DORSET DT3 4JT
Tel: +44 (0) 1305 871543
E-mail: bart at wdi.co.uk
=================================
----- Original Message -----
From: "John L. Webber - Jentro AG" <John.Webber at jentro.com>
To: "David Treves" <dtreves at fastmail.fm>
Cc: <jdom-interest at jdom.org>
Sent: Thursday, April 11, 2002 12:21 PM
Subject: Re: [jdom-interest] Writing foreign languages to XML


> Hi David,
>
> Try setting using an OutputStreamWriter and setting its encoding to
> UTF-8, i.e.
>
> BufferedWriter fileWriter = new BufferedWriter(new
> OutputStreamWriter(new FileOutputStream(myFile), "UTF-8"));
>
> Your XML header should also declare UTF-8 encoding: <?xml version="1.0"
> encoding="UTF-8"?>
>
> I haven't tried this out with Hebrew, but it works fine for me with a
> German locale.
>
> John
>
> David Treves 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
> > characters?
>
> --
> ---------------------------------------------------------
>  Jentro AG
>  John L. Webber, Software Development
> ---------------------------------------------------------
>  Peter-Henlein-Strasse 28, 85540 Haar/Munich, Germany
>  Tel. +49 89 462 385 0     mailto:John.Webber at jentro.com
>  Fax  +49 89 462 385 29    http://www.jentro.com
> ---------------------------------------------------------
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com
>
> ---------- Automatically inserted by WDI Mailserver ----------------
> This message has been scanned for virus, trojans, illegal relays and
> spam. If you have any comments, problems or questions please do not
> hesitate to contact:
> Abbotsbury Software Ltd
> Tel: +44 1305 871543 Fax: +44 1305 871688
> Email: postmaster at wdi.co.uk
> Web: http://www.wdi.co.uk/virus.phtml




More information about the jdom-interest mailing list