You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by "Fitzgerald, Graeme" <gr...@documentum.com> on 2004/03/10 17:27:49 UTC
Transformer encoding nonsense
I am using javax.xml.transform.Transformer to write some XML that contains
the Trade Mark sign. I want to write the TM out as HTML character entity
™ which does not happen since my default encoding is UTF-8.
When I use
javax.xml.transform.Transformer.setOutputProperty(OutputKeys.ENCODING,
"UCS") i get what i want ( ™ in the output file). The trouble is that
if I use
javax.xml.transform.Transformer.setOutputProperty(OutputKeys.ENCODING,
"abcxyz") ,i.e a nonsense encoding, I still get what i want. Does anyone
know why the nonsense encoding works for me?
Thanks,
Graeme