MBTOWC(3) | Library Functions Manual | MBTOWC(3) |
In state-dependent encodings, s may point to the special sequence bytes to change the shift-state. Although such sequence bytes correspond to no individual wide-character code, mbtowc() changes its own state by the sequence bytes and treats them as if they are a part of the subsequence multibyte character.
Unlike mbrtowc(3), the first n bytes pointed to by s need to form an entire multibyte character. Otherwise, this function causes an error.
Calling any other functions in Standard C Library (libc, -lc) never changes the internal state of mbtowc(), except for calling setlocale(3) with changing the LC_CTYPE category of the current locale. Such setlocale(3) call causes the internal state of this function to be indeterminate.
The behaviour of mbtowc() is affected by the LC_CTYPE category of the current locale.
There are special cases:
When s is equal to NULL, mbtowc() returns:
February 3, 2002 | NetBSD 6.1 |