Re: [Mingw-w64-public] Return value of mbrtowc

2025-06-26 Thread Kirill Makurin
``` The only difference between ISO C, of the specification about the return value, is that ISO C says 'multibyte character' while POSIX says 'character'. ``` Thanks. I probably should get a copy of C standard on my hands. ``` This reads to me like 'the number of bytes' is the number of bytes wi

Re: [Mingw-w64-public] Return value of mbrtowc

2025-06-26 Thread LIU Hao
在 2025-6-26 16:15, Kirill Makurin 写道: Hello, I was investigating wc*tomb* and mb*towc* functions in CRT and comparing their behavior to other implementations. Take the following example: ``` mbrtowc (NULL, s, 1, ps) mbrtowc (NULL, s + 1, 1, ps) ``` Here, `s` is a pointer to multibyte (DBCS)

[Mingw-w64-public] Return value of mbrtowc

2025-06-26 Thread Kirill Makurin
Hello, I was investigating wc*tomb* and mb*towc* functions in CRT and comparing their behavior to other implementations. Take the following example: ``` mbrtowc (NULL, s, 1, ps) mbrtowc (NULL, s + 1, 1, ps) ``` Here, `s` is a pointer to multibyte (DBCS) character, but since n==1 mbrtowc retur