在 2026-2-12 18:20, Kirill Makurin 写道:
Both __mingw_{mbrtowc,wcrtomb}_cp are mingw-w64's private functions, so there
is no need to use `mbstate_t` the same way as CRT does. On top of that, UCRT
uses `long` member of `mbstate_t` the same way as MSVCRT uses `mbstate_t` as
whole with SBCS/DBCS code pages; both `short` members in UCRT's `mbstate_t` are
only used when converting UTF-8.
Right, but what if `CP_UTF8` is passed, either indirectly or unintentionally in the future, on UCRT? It should be handled for UCRT.
The first patch looks good to me. I have pushed it now. -- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
