Convert strings from one code page to another. This API combines the following three converter APIs for the default conversion:
unsigned int CWB_ENTRY cwbNL_ConvertCodePagesEx( unsigned long sourceCodePage, unsigned long targetCodePage, unsigned long sourceLength, unsigned long targetLength, char *sourceBuffer, char *targetBuffer, unsigned long *numberOfErrors, unsigned long *positionOfFirstError, unsigned long *requiredLen, cwbSV_ErrHandle errorHandle);
The following list shows common return values.
The following values may be specified on the sourceCodePage and the targetCodePage parameters:
Value | Meaning |
---|---|
CWBNL_CP_UNICODE_F200 | UCS2 Version 1.1 UNICODE |
CWBNL_CP_UNICODE | UCS2 Current® Version UNICODE |
CWBNL_CP_AS400 | iSeries server host code page |
CWBNL_CP_CLIENT_OEM | OEM client code page |
CWBNL_CP_CLIENT_ANSI | ANSI client code page |
CWBNL_CP_CLIENT_UNICODE | UNICODE client code page |
CWBNL_CP_UTF8 | UCS transformation form, 8–bit format |
CWBNL_CP_CLIENT | Generic client code page. Default is CWBNL_CP_CLIENT_OEM. CWBNL_CP_CLIENT is set to CWBNL_CP_CLIENT_ANSI when CWB_ANSI is defined, to CWBNL_CP_CLIENT_UNICODE when CWB_UNICODE is defined and to CWBNL_CP_CLIENT_OEM when CWB_OEM is defined. |
CWBNL_CP_UTF16BE | UTF-16 (Big-Endian) |
CWBNL_CP_UTF16LE | UTF-16 (Little-Endian) |
CWBNL_CP_UTF16 | CWBNL_CP_UTF16BE or CWBNL_CP_UTF16LE, depending on the platform |
CWBNL_CP_UTF32BE | UTF-32 (Big-Endian) |
CWBNL_CP_UTF32LE | UTF-34 (Little-Endian) |
CWBNL_CP_UTF32 | CWBNL_CP_UTF32BE or CWBNL_CP_UTF32LE, depending on the platform |