Class XalanSurrogateRepair

java.lang.Object
eu.bandm.tools.util3.XalanSurrogateRepair

public class XalanSurrogateRepair extends Object
Xalan has a severe bug: surrogate code elements(= two consecutive 16bit words = two adjacent Java chars) are encoded separately as character references, when serializing to a utf8 stream. (Same with utf16 stream!) This is wrong. This code here repairs the resulting file, but only for this this special case: It does not consider "CDATA-SECTIONS", etc. It does not decode hexadecimal numeric character references. There is no error handling.