https://bugs.winehq.org/show_bug.cgi?id=53939 Bug ID: 53939 Summary: TextOut will output ASCII control character(0~31) as tofu cause crash Product: Wine Version: 7.12 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: blocker Priority: P2 Component: gdi32 Assignee: wine-bugs(a)winehq.org Reporter: 399989567(a)qq.com Distribution: --- TextOut will output ASCII control character(0~31) as tofu cause crash build a string on windows
static WCHAR str[] = {0x1c,0x30,0x31,0x32,0}
use TextOut(hdc,x,y,str,wcslen(str)) to output this str on windows: output is "012" on wine : output is "?012" The reason is that this API does not filter ASCII control characters, and treats the control characters as an ordinary character to output. by the way if we fillter the control character we alse need fix the API :GetTextExtentExPointW Because my program uses control characters, there will be problems when calculating the length, resulting in a crash. If I filter out the control characters in the code myself, it will not crash. And in principle, the focus should be on whether control characters should be output -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.