Character Conversion APIs
The character conversion APIs are:
- Code Conversion (iconv()) converts a buffer of characters from one coded character set identifier (CCSID) into another CCSID.
- Code Conversion Allocation (QtqIconvOpen()) performs the necessary initializations to convert character encodings and returns a conversion descriptor.
- Code Conversion Allocation (iconv_open()) performs the necessary initializations to convert character encodings and returns a conversion descriptor of type iconv_t.
- Code Conversion Deallocation (iconv_close()) closes the conversion descriptor cd that was initialized by the iconv_open() or QtqIconvOpen() function.
- Convert Data (QDCXLATE) converts data through the use of a table object.
The following character conversion APIs are designed to meet the X/Open industry standard functions (formerly Spec 1170).
- iconv()
- iconv_open()
- iconv_close()
Note: The QtqIconvOpen() function does not meet the X/Open industry standard.
The three-step conversion provided by the code conversion APIs allows applications to:
- Open a conversion descriptor with a specified CCSID pair (iconv_open() or QtqIconvOpen() function)
- Do multiple conversions (iconv() function)
- Close the conversion descriptor when done (iconv_close() function)
This reduces the overhead for applications that need to do multiple conversions using the same CCSID pairs. These functions are performed on the system as entry points in a bindable Integrated Language Environment® (ILE) service program.
Note: The CDRA API, Convert a Graphic Character String (CDRCVRT), converts a graphic character data string from one CCSID to another CCSID.