IV27266: ONE SURROGATE PAIR COUNTED AS TWO CHARS BY THE XML SCHEMA VALIDA TOR
Closed as program error.
Error Message: Value '?' with length = '2' is not facet-valid with respect to maxLength '1' for type 'XXXType' . Stack Trace: org.xml.sax.SAXParseException: cvc-maxLength-valid: Value '?' with length = '2' is not facet-valid with respect to maxLength '1' for type 'XXXType'. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExcepti on( at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter .reportError(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError at org.apache.xerces.impl.xs.XMLSchemaValidator.processOneAttribute at org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes .
When the XML Schema validator computes the length of a string in characters it does so using String.length() instead of counting the number of Unicode code points. With String.length() a surrogate pair (representing a single character) is counted as two characters instead of one.
This defect will be fixed in: 6.0.0 SR12 6.0.1 SR4 . Introduced a system property for controlling how string length is computed by the schema validator. When org.apache.xerces.impl.dv.xs.useCodePointCountForStringLength is set to true, the length of an xs:string or xs:anyURI value is calculated by counting the number of Unicode code points in the string. The value of the system property is false by default, preserving the long standing behaviour of computing length in Java chars (i.e. String.length()). .
Reported component name
JAVA CLASS LIBS
Reported component ID
Last modified date
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fixed component name
JAVA CLASS LIBS
Fixed component ID
Applicable component levels