March 27, 2026
11:35 p.m.
Seems like legacy `msvcrt` treats `%Z` differently from modern UCRT. <span dir="">`%Z` always expect an `ANSI_STRING`, regardless of </span>the character type of the `printf` function. For modern UCRT, `%Z` expects a `UNICODE_STRING` in normal functions but expects an `ANSI_STRING` in wide functions (similar to `%S`). `%wZ` and `%hZ` still works as expected. `%wZ` always requires a `UNICODE_STRING` and `%hZ` always requires an `ANSI_STRING`. I just fixed the code and tests to account for this case. I will clean up the commit history once I get back home. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10460#note_134184