在 2026-2-25 03:53, Pali Rohár 写道:
Format %C and %S uses opposite wideness as format %c and %s. So %S in printf uses wchar_t* string and in wprintf uses char* string. Format %C and %S can be changed by l or h modifiers, like %c and %s. So for example %hC uses char type in both printf and wprintf calls and for example %lS uses wchar_t* string in both swprintf and sprintf. This change fixes the mingw_pformat function to correctly process %C and %S formats with optional l and h modifiers. This also aligns mingw-w64 support with crtdll, msvcrt and UCRT *printf functions. --- mingw-w64-crt/stdio/mingw_pformat.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-)
But that's not standard behavior. I think we're too late for such changes; people who have been used to the standard behavior would be annoyed.
The remaining patches for `%Z` should be acceptable, though. There are some typos in commit messages which have to be fixed.
-- 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
