``` 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 within 'the next n or fewer bytes'. ``` I agree with you reading. This means CRT's return value is non-conformant. Since this is the behavior implemented in UCRT, I see no reason to implement ISO C behavior for replacement. This could lead to situation when code with older CRTs (which use replacement) works while fails with UCRT. Implementing replacements for conversion functions for MSVCRT is easy since they only need to handle DBCS character sets. All DBCS code pages supported by Windows use lead bytes. UCRT on the other hand supports UTF-8 and this is much more trouble to implement, I doubt anyone would even try. - Kirill Makurin _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public