powered by Jive Software

MXParser has a problem for character

has problem location

class org.jivesoftware.openfire.net.MXParser

code

@Override

protected char more() throws IOException, XmlPullParserException {

final char codePoint = super.more(); // note - this does NOT return a codepoint now, but simply a (single byte) character!

if ((codePoint == 0x0) || // 0x0 is not allowed, but flash clients insist on sending this as the very first character of a stream. We should stop allowing this codepoint after the first byte has been parsed.

(codePoint == 0x9) ||

(codePoint == 0xA) ||

(codePoint == 0xD) ||

((codePoint >= 0x20) && (codePoint <= 0xD7FF)) ||

((codePoint >= 0xE000) && (codePoint <= 0xFFFD)) ||

((codePoint >= 0x10000) && (codePoint <= 0x10FFFF))) {

return codePoint;

}

throw new XmlPullParserException(“Illegal XML character: " + Integer.parseInt(codePoint+”", 16));

}

char is unicode , min value is 0x0 and max value is 0xffff,

string " " is two char, and not In the range.

And Integer.parseInt(codePoint+"", 16) is also error, where string is " "

See Annex content.png

Some Chinese characters can’t Normal display in the current site