CRTL, mbsrtowcs, Return Values
*Conan The Librarian
n The number of multibyte characters successfully converted, sequence, not including the terminating null (if any). -1 Indicates an error. A sequence of bytes that do not form valid multibyte character was encountered. errno is set to EILSEQ; the conversion state is undefined.