Conversion between multibyte and wide characters

To use wide characters, you convert multibyte characters to their wide character equivalents, process the characters, and convert the wide characters back to their multibyte equivalents.

The library supports conversion between a multibyte form of a code set and its wide-character form. Unlike code-set conversion, the actual integral value of each character does not change in this conversion.

To change all character data to wide characters, you must first locate the character data and then find all the places where it is assigned and passed to functions. functions perform the following tasks to convert between multibyte and wide characters:
  • To convert from a multibyte character to a wide character, the code point of the multibyte character is assigned a fixed number of bytes for all values, padded on the left with zeros:
    • The ifx_gl_mbtowc() function performs this conversion from multibyte character to wide character.
    • The ifx_gl_mbstowcs() function performs this conversion from multibyte-character string to wide-character string.
  • To convert from a wide character to a multibyte character, the code point of the wide character is assigned the minimum number of bytes necessary to represent the value:
    • The ifx_gl_wctomb() function performs this conversion from wide character to multibyte character.
    • The ifx_gl_wcstombs() function performs this conversion from wide-character string to multibyte-character string.