MBRTOWC(3) Linux Programmer's Manual MBRTOWC(3)
mbrtowc - convert a multibyte sequence to a wide character
size_t mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
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'