xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Cobban" <jcob...@magma.ca>
Subject Re: UTF-8 output invalid from org.apache.xml.serialize.XMLSerializer
Date Sat, 06 Dec 2003 17:35:44 GMT
----- Original Message ----- 
From: "J.Pietschmann" <j3322ptm@yahoo.de>
To: <general@xml.apache.org>
Sent: Saturday, December 06, 2003 12:24 PM
Subject: Re: UTF-8 output invalid from
org.apache.xml.serialize.XMLSerializer


> Jim Cobban wrote:
> >      serializer = new XMLSerializer (
> >     new FileWriter(fileName),
>
> This FileWriter will write characters to the file according
> to the default platform encoding (most likely ISO-8859-1).
> The serializer doesn't even get a chance to decide about
> the encoding. You should supply a FileOutputStream to the
> serializer.

Thank you.  I knew I was doing something wrong, and that is precisely the
mistake I made.  I copied the code from an example that came with the
package without taking the time to understand exactly what was going on.
When I changed the code to construct a FileOutputStream it worked correctly.

Note to self: RTFM


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message