Converts a multibyte character to its wide-character equivalent.
#include <stdlib.h>
int mbtowc (wchar_t *pwc, const char *s, size_t
n);
If pwc is a NULL pointer and s is not a null pointer, the function determines the number of bytes that constitute the multibyte character pointed to by s (regardless of the value of n).
This function is affected by the LC_CTYPE category of the program's current locale.
| x | The number of bytes that comprise the valid character pointed to by s. |
| 0 | If s is either a NULL pointer or a pointer to the null byte. |
| -1 | Indicates an error occurred. The function sets errno to EILSEQ - Invalid character detected. |