Use this function to convert Universal Character Set (UCS) data to multibyte string data. This function is, typically, used only for formatting diagnostic messages. Normal processing is best done in UCS-2, which can represent all characters from all languages.
The sample code in BipSampPluginUtil.c contains more utilities for processing UCS-2 characters in a portable way.
int cciUcsToMbs(
int* returnCode,
const CciChar* ucsString,
char* mbString,
int mbStringLength,
int codePage);
For an ASCII system, a value of 1208 (meaning code page ibm-1208, which is UTF-8 Unicode) is a good choice if you are using cciUcsToMbs to convert string constants for processing by IBM® Integration Bus. 1208 is appropriate for Linux, UNIX, and Windows.
On Linux and UNIX systems, nl_langinfo(CODEPAGE) gives you the code page that has been selected by the setlocale command.
On z/OS®, the default code page for WebSphere® MQ, which is 500, must not be used. Instead, use a code page value of 1047.
The returnCode parameter is set to the converted length in bytes.