On Wed Apr 1 15:50:19 2026 +0000, Piotr Caban wrote:
Please ignore the comment about portability - I was wrong. Sorry about that. The results for ucrtbase are strange. The documentation states that ucrtbase has a bug that is preserved for backward compatibility. Unfortunately this means that ucrtbase needs to be special-cased. I was hoping that it can be avoided by using proper flags. I have added some minor changes to your patches: [aefe9521b1e20674f059fa52be45d45a47c44d88](https://gitlab.winehq.org/piotr/wine/-/commit/aefe9521b1e20674f059fa52be45d4...), [c84e147eceeb2a48e1053bf9e4ab7cb6ea243f9e](https://gitlab.winehq.org/piotr/wine/-/commit/c84e147eceeb2a48e1053bf9e4ab7c...). If it looks good please push the patches to this MR. Here's a short list of changes: * added more tests * fixed handling of UNICODE_STRING with broken length * pass length in characters to pf_handle_string function * simplify pf_is_str_wide helper Thanks, I've reviewed and pushed the patches. I made some changes on top of that:
* Whitespace changes in the block that calls `pf_is_str_wide` in `pf_printf` to be more consistent with surrounding code. * The `%Z` test with a truncated string was changed from `"wide"` to `"not wide"` because its parameter is a `ANSI_STRING` (this one was an issue I left behind in my previous patch, not related to your changes). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10460#note_134711