|
Subject: RE: [xsl] question with xalan, java, utf8 From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Fri, 19 Apr 2002 23:16:06 +0100 |
> I'm trying to output HTML using UTF-8 characters. When I use Instant
> Saxon with my xml and xsl file, all if well. But if I try to do this
> through Java I've had multiple problems!
>
> FileWriter output = new FileWriter("/tmp/testlog");
>
When you provide a Writer as the output destination, Saxon simply writes
characters to the Writer. The Writer itself translates these into bytes,
using whatever encoding it decides is apppropriate. If you want to control
the encoding from the stylesheet, you must supply an OutputStream, not a
Writer - that way it's Saxon's job to convert characters to bytes, not
Java's.
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] question with xalan, java, J.Pietschmann | Thread | Re: [xsl] question with xalan, java, mjyoungblut |
| [xsl] XPath Explorer, alex | Date | RE: [xsl] question with xalan, java, Michael Kay |
| Month |