[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] question with xalan, java, utf8
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|