mbstate_t state = 0; int result = mbrtowc (pwc, s, n, &state);
mbstate_t state; int result; memset(&state, 0, sizeof(state)); result = mbrtowc (pwc, s, n, &state);
int mbtowc (wchar_t *pwc, const char *s, size_t n){  mbstate_t state = 0;  int result = mbrtowc (pwc, s, n, &state);  if (result >= 0)    return result;  else    return -1;}