3 Jun
2025
3 Jun
'25
11:17 p.m.
That, in particular, fixes a crash in Crysis 2 Remastered which is happening after commit a0e2cbd46a7e629005ff306f032b02c263362775. At least for UTF8 locale WideCharToMultiByte() always fails in create_locinfo(). The code doesn't assume any failures there (leaving potentially initialized data), I guess such a case warrants a FIXME (patch 1). Currently tolower() / toupper() for utf8 chars 128-255 locale will return some bogus characters instead of unchanged input character. Then, GetCPInfo(CP_UTF8, ...) doesn't report any LeadBytes (also on Windows) which I guess pretty much warrants special handling for utf8 in ucrtbase. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8198#note_105300