int mbtowc_l(wchar_t *pwc, const char *s, size_t n, __locale_s *loc);
mbtowc_l converts a single multi-byte character to a wide character in locale loc.
If s is a null pointer, mbtowc_l returns a nonzero value if multi-byte character encodings are state-dependent in the locale loc, and zero otherwise.
If s is not null and the object that s points to is a wide-character null character, mbtowc_l returns 0.
If s is not null and the object that points to forms a valid multi-byte character, mbtowc_l returns the length in bytes of the multi-byte character.
If the object that s points to does not form a valid multi-byte character within the first n characters, it returns −1.