MBRTOWC(3) Linux Programmer's Manual MBRTOWC(3)
NAME
mbrtowc - convert a multibyte sequence to a wide character
SYNOPSIS
#include <wchar.h>
size_t mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
DESCRIPTION
The main case for this function is when s is not NULL and pwc is not NULL. In this case, the mbrtowc() function inspects at most n bytes
of the multibyte string starting at s, extracts the next complete multibyte character, converts it to a wide character and stores it at
*pwc. It updates the shift state *ps. If the converted wide character is not L'