Subject: Re: [xsl] encoding problem while reading the content in From: "J.Pietschmann" <j3322ptm@xxxxxxxx> Date: Tue, 11 Nov 2003 23:13:12 +0100 |
...I am reading an xml file from an sftp location and passing that through the Transformer (using Java1.4.1's API). The xml file has "windows-1252" encoding declared. It has special characters like ® directly put in the file.
Any one has any suggestions? I would greatly appreciate!
Just avoid dealing with the encoding yourself and leave it to the XML parser, for example use plain
byte[] rawData = rawfileOutputStream.toByteArray(); transformer.transform( new StreamSource(new ByteArrayInputStream(rawData)), new StreamResult(new OutputStreamWriter(out));
If the parser can't handle the windows-1252 encoding and barfs, get another one. If you want to check the output you should use UTF-8 as encoding (the default) and use an UTF-8 capable viewer (Emacs 21 will do on Solaris).
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] encoding problem while readin, Pramodh Peddi | Thread | Re: [xsl] encoding problem while re, Pramodh Peddi |
[xsl] nested xsl:choose?, Arouza, Kevin | Date | [xsl] convert large array to severa, David Everly |
Month |