It is true that MB_CUR_MAX > 2 does not always mean UTF-8, for example it is 
also possible to request ISO-2022-* character sets using code pages 
50220-50229[1]. There are also some other code pages for which MB_CUR_MAX > 2.

When I tried to test whether CRT's conversion functions actually handle those 
character sets, they failed to convert even simple ASCII strings. To be 
completely fair, I only tried wchar-to-char conversion in my tests, and maybe 
they actually work the other way around...

Regardless of what charset is in use when MB_CUR_MAX > 2, we will call CRTs 
versions which are expected to handle them. If they don't, there is nothing we 
can do about it.

The only tricky part of this is that we need provide implementation which 
chooses whether to call our replacements or *real* CRT's versions based on 
value of MB_CUR_MAX.

[1] https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to