https://bugs.winehq.org/show_bug.cgi?id=49378
Bug ID: 49378 Summary: kernel32.WriteFile with multi byte characters reports incorrect number of written bytes Product: Wine Version: 5.10 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: suokkos@gmail.com Distribution: ---
Created attachment 67438 --> https://bugs.winehq.org/attachment.cgi?id=67438 Wine test case to trigger the bug
Writing utf-8 multibyte characters to stdout using stdio led to uncovering this bug. Attached test case is a simple way to trigger the underlying issue.
Minimal steps leading to issue: 1. Set console output to CP_UTF8 2. Use WriteFile with multibyte characters
Expect outcome: WriteFile reports number of bytes written.
Actual outcome: WriteFile reports number of characters written.
Other observations while writing test case: I first run same test case using kernelbase.WriteFile. Base version seems to behavior differently because my test case passed. I only then noticed the important detail that there is multiple WriteFile entry points.