If XMLWriter is given input that includes UTF-16
surrogate characters outside the BMP, it should decode
them so the correct numeric reference is included in
the output.
// A valid character that caused a problem
public void testValidNonSurrogate() throws
SAXException, IOException
{
xw.dataElement("x", "\uFF09");
xw.endDocument();
xw.flush();
Test cases for UTF-16 surrogates.
Logged In: YES
user_id=847250
Patch to pass tests.
Patch to deal with surrogate characters.
Logged In: YES
user_id=847250
Missed a case:
// A valid character that caused a problem
public void testValidNonSurrogate() throws
SAXException, IOException
{
xw.dataElement("x", "\uFF09");
xw.endDocument();
xw.flush();
assertEquals("<x>)</x>",
sw.toString().trim());
}
Patch resubmitted to deal with this correctly.