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');
y := TOUNICODE(x,'US-ASCII');

OUTPUT(x); //results in 4142434445
OUTPUT(y); //results in 'ABCDE'

See Also: FROMUNICODE, UNICODEORDER