Thanks for your answer.
> > Nevertheless, I don't really understand the purpose of this function.
> > Is it supposed to bypass a bug in mbsrtowcs (defined in wchar.h), as
> > said in the following commentaries?
> > /* xmbsrtowcs.c -- replacement function for mbsrtowcs */
> > /* On some locales (ex. ja_JP.sjis), mbsrtowc doesn't convert 0x5c to
> U<0x5c>.
> > So, this function is made for converting 0x5c to U<0x5c>. */
> > If so, why isn't it corrected to wchar.h?
>
>
> I don't really understand this question.
What is the role of xmbsrtowcs? Why doesn't mbsrtowcs convert 0x5c to U<0x5c>?