-
1. XML Parsing Error: Invalid unicode character with NEKO
mhn Jan 10, 2011 10:31 AM (in response to mhn)After a lot of debugging I found an inconsistency.
In my sample user enters the Unicode Character 'START OF HEADING' (in windows Alt + 01 or U+0001).
http://www.fileformat.info/info/unicode/char/1/index.htm
This character is rendered as \u0001 in outputText tags which is fine.
It causes the above mentioned parsing error if it is rendered as an attribute value, e.g. as value of an inputText field.
This is caused by a wrong transformation in class org.ajax4jsf.xml.serializer.ToXHTMLStream.
Method ToXHTMLStream.writeAttrString contains following check:
String outputStringForChar = m_charInfo.getOutputStringForChar(ch);
if (null != outputStringForChar)
{
writer.write(outputStringForChar);
}
else if (escapingNotNeeded(ch))
{
writer.write(ch); // no escaping in this case
}
else
{
writer.write("&#");
writer.write(Integer.toString(ch)); //THIS IS CALLED!
writer.write(';');
}
The 'START OF HEADING' control char is transformed to the entity  which results in an parsing error on client side.
-
2. XML Parsing Error: Invalid unicode character with NEKO
mhn Jan 10, 2011 12:11 PM (in response to mhn)Is there any workaorund or should I create a JIRA issue ?