Skip to main content

TOUNICODE

TOUNICODE( string, encoding )

stringThe DATA string to translate.
encodingThe encoding codepage (supported by IBM's ICU) to use for the translation.
Return:TOUNICODE returns a single UNICODE value.

The TOUNICODE function returns the string translated from the DATA value to the specified unicode encoding.

Example:

DATA5 x := FROMUNICODE(u'ABCDE','UTF-8');
  //results in 4142434445
y := TOUNICODE(x,'US-ASCII');

See Also: FROMUNICODE, UNICODEORDER