Start of change

XML-SAX with "ccsid=1200" or "ccsid=13488", when the default UCS-2 CCSID for the module is a different CCSID

In prior releases, when option "ccsid=1200" was specified for the XML-SAX operation, and keyword CCSID(*UCS2:1200) was not specified in the control statements, the RPG runtime did not pass the correct parameters for string events. The length parameter was the number of characters, while it should have been the number of bytes in the string. For the *XML_PREDEF_REF and *XML_ATTR_PREDEF_REF events, the value was passed as a UTF-8 value, and the length parameter had a value of 1, while it should have been passed as a UCS-2 value with a length of 2.

Similar problems occurred when option "ccsid=13488" was specified for the XML-SAX operation, and keyword CCSID(*UCS2:1200) was specified in the control statements.

Starting in IBM® i 7.4, the RPG runtime now handles string events correctly when option "ccsid=1200" or "ccsid=13488" is specified. The length parameter for string events represents the number of bytes in the string. For the *XML_PREDEF_REF and *XML_ATTR_PREDEF_REF events, the string is a UCS-2 value and the length is 2.

If you wrote your XML-SAX handler procedure to expect the *XML_PREDEF_REF and *XML_ATTR_PREDEF_REF events to be a UTF-8 value instead of the documented UCS-2 value, the handler procedure must be changed to expect a UCS-2 value for these events.

This change affects all ILE RPG programs running on IBM i 7.4, even programs compiled for an earlier target release.

End of change