Having some odd issues, and hoping someone can help me out
I'm applying a stylesheet to incoming data that contains, among other things, section characters ('�') encoded as character references (eg. & #xa7 ; ) . The output from this stylesheet must be passed to some older Legacy systems which can't handle Unicode chars, so I've set the output encoding on the stylesheets to be ISO-8859-1. When that happens, I get this in the output:
'��'
When I set the output encoidng to UTF-8 in the stylesheets, I get only the section char, as is appropriate. This is when running it through my application. if I simply call
java org.apache.xalan.xslt.Process directly and pass it the stylesheet and the input data, the output is encoded correctly, in ISO-8859-1, without the bogus C2 ('�') character. So, I'm thinking it must be something in the way I'm processing the data? Here are the relevant bits of code:
Also, this is how I am creating the XMLReader:
The reader is being used to tell the parser to ignore the DTD, and to use namespaces. These are the features and their values:
http://xml.org/sax/features/validation=false
http://apache.org/xml/features/nonvalidating/load-external-dtd=false
http://xml.org/sax/features/namespace-prefixes=true
http://xml.org/sax/features/namespaces=true
Any suggestions would be appreciated!
Thanks,
-tim stevens
[ April 10, 2003: Message edited by: Tim Stevens ]
[ April 10, 2003: Message edited by: Tim Stevens ]