Thanks for the link, Pali. When running tests with msvcrt10.dll, they fail with the following error when trying to set locale which uses DBCS code page:
``` runtime error R6018 - unexpected heap error ``` It seems to confirm my suspicions that msvcrt10.dll may not support MBCS at all. It also does not have mbctype.h and mbstring.h. I think it is worth to mention that string.h functions like strtok do not recognize multibyte characters and always treat input strings as single-byte strings (that is, just like a null-terminated sequence of bytes). Back to topic, it seems that this issue comes from sign-extended input to isleadbyte() in mbrtowc.c. I'll send patches later today which: - fix issue with sign-extended input to isleadbyte() in mbrtowc.c - disable DBCS tests for msvcrt10.dll (but not crtdll.dll) - Kirill Makurin ________________________________ From: Pali Rohár <[email protected]> Sent: Friday, September 5, 2025 1:26 AM To: Kirill Makurin <[email protected]> Cc: mingw-w64-public <[email protected]> Subject: Re: Tests for mbrlen, mbrtowc and mbsrtowcs fail with crtdll.dll On Thursday 04 September 2025 09:50:22 Kirill Makurin wrote: > I do not have msvcrt10.dll to run tests with it. It would be helpful if > anyone could run tests with crtdll.dll and msvcrt10.dll to see how they > behave. msvcrt10.dll can be find on the archive.org, I found one here: https://archive.org/download/microsoft-visual-c-1.10-for-windows-nt/Visual%20C%2B%2B%201.10%20NT%20and%2032s.iso/MSVCNT/BIN/MSVCRT10.DLL _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
