If s is a NULL pointer, mbrtowc is equivalent to the call: mbrtowc(NULL, "", 1, ps) In this case, the values of pwc and n are ignored. If s is not a NULL pointer, mbrtowc inspects at most n bytes beginning with the byte pointed to by s to determine the number of bytes needed to complete the next multibyte character (including any shift sequences). If the function determines that the next multibyte character is completed, it determines the value of the corresponding wide character and then, if pwc is not a NULL pointer, stores that value in the object pointed to by pwc. If the corresponding wide character is the null wide character, the resulting state described is the initial conversion state. If mbrtowc is called as a counting function, which means that pwc is a NULL pointer and s is neither a NULL pointer nor a pointer to a null byte, the value of the internal mbstate_t object will remain unchanged.