Wide Character Conversions to and from Single-Byte or Multibyte Characters

The character conversion routines examine the CCSID setting for the LC_CTYPE category of the current locale to determine whether single-byte or multibyte characters are expected for the conversion from or to wide characters.

The handling of wide character conversions (to and from single-byte or multibyte character strings) is dependent on the LOCALETYPE parameter value specified on the compilation command. The handling depends on the shift state of the single-byte or multibyte character string. The mbtowc, mbstowcs, wctomb, and wcstombs functions maintain an internal shift state variable. The mbrtowc, mbsrtowcs, wcrtomb, and wcsrtombs functions allow the shift state variable to be passed as a parameter. The second set of functions is recommended because they are more versatile and are also threadsafe.



[ Top of Page | Previous Page | Next Page | Contents | Index ]