[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

question with xalan, java, utf8

Subject: question with xalan, java, utf8
From: Gail Buffington <gbuffing@xxxxxxxxxxxx>
Date: Fri, 19 Apr 2002 15:16:22 -0400
java utf 8
Hi,

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");

// StringWriter output = new StringWriter();

StreamResult result = new StreamResult(output);
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF8");

transformer.transform(xmlSource, result);


xmlSource was created from a UTF8 file using:


StreamSource xmlSource = fileStreamSource(xmlSourceFile);

the transformer was created using:

transformer = tFactory.newTransformer(xslSource);

xslSource was created the same way as xslSource only no UTF-8
characters.

The resulting output has garbled UTF-8 characters.

Can anyone help?

Thanks!

Gail Buffington
Keithley Instruments


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.