Converting to or from UTF-8 (Unicode) representation
You can implicitly or explicitly convert data items to UTF-8 representation.
About this task
You can implicitly
convert alphabetic or national data to UTF-8 data by using the MOVE
statement.
Implicit conversions also take place in other COBOL statements, such as IF
statements that compare an alphanumeric data item with a data item that has USAGE
UTF-8
.
You can explicitly convert UTF-16 data to UTF-8 data and UTF-8 data to alphanumeric data by using
the DISPLAY-OF
intrinsic function. You can also explicitly convert UTF-8 data to
UTF-16 data by using the NATIONAL-OF
intrinsic function. When using the
DISPLAY-OF
intrinsic function to convert UTF-16 to UTF-8, you must specify an
output code page of 1208.
Related tasks
Converting alphanumeric or national to UTF-8 (MOVE)
Converting UTF-8 to national (NATIONAL-OF)
Converting national to UTF-8 and UTF-8 to alphanumeric (DISPLAY-OF)
Overriding the default code page
Comparing UTF-8 data
Converting alphanumeric or national to UTF-8 (MOVE)
Converting UTF-8 to national (NATIONAL-OF)
Converting national to UTF-8 and UTF-8 to alphanumeric (DISPLAY-OF)
Overriding the default code page
Comparing UTF-8 data
Related references
CODEPAGE
Conversion exceptions
DISPLAY-OF (Enterprise COBOL for z/OS® Language Reference)
NATIONAL-OF (Enterprise COBOL for z/OS Language Reference)
CODEPAGE
Conversion exceptions
DISPLAY-OF (Enterprise COBOL for z/OS® Language Reference)
NATIONAL-OF (Enterprise COBOL for z/OS Language Reference)