btowc

wint_t btowc(int c);

The function returns WEOF if c equals EOF. Otherwise, it converts (unsigned char)c as a one-byte multibyte character beginning in the initial conversion state, as if by calling mbrtowc. If the conversion succeeds, the function returns the wide-character conversion. Otherwise, it returns WEOF.