| manpages.info - online man pages | ![]() |
|||
|
mbrtowc (3) Table of Contents
Namembrtowc - convert a character to a wide-character code (restartable)
LibraryStandard C Library (libc, -lc)
Synopsis#include <wchar.h>
size_t
DescriptionThe mbrtowc() function inspects at most n bytes pointed to by s and interprets them as a multibyte character sequence according to the current setting of LC_CTYPE. If pwc is not NULL, the multibyte character which s represents is stored in the wchar_t it points to.
If s is NULL, mbrtowc() behaves as if pwc was NULL, s was an empty string ("") and n was 1.
The mbstate_t argument, ps, is used to keep track of the shift state. If it is NULL, mbrtowc() uses an internal, static mbstate_t object.
Return ValuesThe mbrtowc() functions returns:
(size_t)-2
(size_t)-1
ErrorsThe mbrtowc() function will fail if:
See Alsombtowc(3) , setlocale(3) , wcrtomb(3)
StandardsThe mbrtowc() function conforms to ISO/IEC 9899:1999 (``ISO C99'').
BugsThe current implementation does not support shift states.
|