Hi,

> Basically: If there isn't a representation of the character in that
> encoding, there _IS_ no correct "raw data" for Text output. Pick another
> character, or another encoding, as appropriate.

... but, if the particular text output format that you are targeting
has some syntax for representing characters outside its encoding set,
then you can adapt your output to that format by writing a custom
serializer. The easiest way is to subclass an existing serializer,
such as Xalan's org.apache.xalan.serialize.SerialierToText or Xerces'
org.apache.xml.serialize.TextSerializer, and override how characters
are handled. Then plug that serializer into Xalan as a SAXResult, to
let it handle the output instead of Xalan's own serialization stuff.

Cheers,

        - Gulli

Reply via email to