Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

ULENGTH8

ULENGTH8 returns a FIXED BIN(31) value which is the length of a CHAR string needed if the UTF characters held in a string were converted to UTF-8.

Read syntax diagramSkip visual syntax diagram>>-ULENGTH8(x)-------------------------------------------------><
 
x
Expression which must have CHARACTER or WIDECHAR type.

If x has CHARACTER type, then ULENGTH8 is the same as LENGTH, and the string will not be checked for valid UTF-8 data.

If x has WIDECHAR type, then the string must contain valid UTF-16 data, and ULENGTH8 will return the length of the CHAR string that would result if x were converted from UTF-16 to UTF-8. If the string does not contain valid UTF-16 data, the ERROR condition will be raised.

For example, if x equals the WIDECHAR string '004B_00E4_0073_0065'wx, then


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)