This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: question with xalan, java, utf8
- From: "J.Pietschmann" <j3322ptm at yahoo dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Fri, 19 Apr 2002 22:37:55 +0200
- Subject: Re: [xsl] question with xalan, java, utf8
- References: <4.2.2.20020419151511.02cba5b8@b1-pop>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Gail Buffington wrote:
> FileWriter output = new FileWriter("/tmp/testlog");
> StreamResult result = new StreamResult(output);
...
> The resulting output has garbled UTF-8 characters.
I am under the impression that java.io.FileWrite will
change the character encoding to "the native encoding
of the platform".
Simply use java.io.File instead. This allows the Saxon
serializer to do the encoding itself and write the
resulting bytes directly into the file.
J.Pietschmann
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list