HP-UX 11.0 - 11i Internationalization Features White Paper
Miscellaneous Modifications
Multibyte Support Extension and Unix98 Support [11i v1]
Chapter 7
88
wcrtomb
wcrtomb() converts a wide-character to a multibyte character. It determines the number of bytes needed to
represent the character corresponding to the wide-character code whose value is specified by the second
argument.
wcsrtombs
wcsrtombs() converts a wide-character string to a character string. Note that the behavior of this function is
affected by the LC_CTYPE category of the current locale.
wcsstr
wcsstr() finds a substring in a wide-character string. Note that the behavior of this function is affected by
the LC_CTYPE category of the current locale.
wctob
wctob() converts wide-character to single-byte.
wctrans
wctrans() defines character mapping in the current locale. Note that the values returned by wctrans() are
valid until a call to setlocale() that modifies the category LC_CTYPE.
wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset
These APIs operate with wide-character in memory areas:
— wmemchr() finds a wide-character in a memory array.
— wmemcmp() compares wide-characters in memory.
— wmemcpy() copies wide-character in memory.
— wmemmove() copies wide-characters in memory with overlapping areas.
— wmemset() sets wide-characters in memory.
Modified interfaces
The following APIs may have a change in behavior or a parameter type change that could affect existing
HP-UX code when the Unix98 support is selected.
fprintf, printf, snprintf, sprintf, fscanf, scanf, sscanf
printf(3C), scanf(3C) and related functions support the new qualifier l (the letter) to select wide character
conversion in a given format string and set errno to EILSEQ if the data obtained from the input stream does
not form a valid wide character.
fputwc, putwc, putwchar
The type of first argument is changed from wint_t to wchar_t.
freopen
Regardless of the mode of underlying stream, after a successful call to the freopen() function, the
orientation of the stream is cleared and the associated mbstate_t object is set to describe an initial
conversion state.
wcschr, wcsrchr
The type of second argument is changed from wint_t to wchar_t.