z/OS Common Information Model User's Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF


Converting data to ASCII, EBCDIC and UTF-8

z/OS Common Information Model User's Guide
SC34-2671-00

Converting data to ASCII, EBCDIC and UTF-8

Character encoding in the CIM over HTTP protocol is done using UTF-8 character encoding. For that reason CIM clients expect valid UTF-8 returned by the CIM server. The z/OS CIM server executes in the Enhanced ASCII mode. This means that all string data within the CIM server's address space is represented in ASCII rather than EBCDIC encoding. For a provider this means that all string data exchanged with the CIM server is expected to be in ASCII (codepage ISO/IEC 8859-1), encoded in UTF-8 format. Since the native data of z/OS resources is usually represented in EBCDIC, the provider code needs to convert this data before it can return it to the CIM server through the CMPI interface, or when it receives data from the CIM server through the CMPI interface.

UTF-8 is a multi-byte character encoding for UNICODE which can represent much more characters than EBCDIC. While no issue on returning data from a provider through the CIM server to a client, the range of input characters from a client can be larger than a provider can represent in EBCDIC. All valid (7-bit) ASCII characters are also valid UTF-8. Please note that a transformation of the character encoding from EBCDIC to ASCII can generate invalid ASCII, that is ASCII-code above the 7-bit margin.

Therefore it is recommended to compile the provider's C code using the ASCII option of the z/OS® XL C/C++ compiler. Using the ASCII option also requires the XPLINK compile and link option.

See Appendix B in the z/OS XL C/C++ Run-Time Library Reference for additional information about the Enhanced ASCII support. Also see the z/OS XL C/C++ Guide and the z/OS XL C/C++ Programming Guide for details about the ASCII compiler option.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014