http://bugs.winehq.org/show_bug.cgi?id=35592
Bug ID: 35592 Summary: Chinese input encoding error in multi-byte character set exe with mac driver Product: Wine Version: 1.7.12 Hardware: x86 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: hwei.sy@gmail.com Classification: Unclassified
The exe is compiled in multi-byte character set (not Unicode). When input Chinese, the characters become corrupted.
I looked into this problem, and found that it is due to dlls/user32/message.c@get_input_codepage
The "GetKeyboardLayout" returns a wrong language identifier 0x0404 (Chinese Traditional), but it should be 0x0804 (Chinese Simplified). This may be mac driver's problem.
And I don't think the 1st parameter of "GetLocaleInfoW" should be the language identifier of the keyboard (returned from "GetKeyboardLayout"). It should be constant "LOCAL_USER_DEFAULT". The keyboard language identifier does not always match the code page of a program. The keyboard language identifier can be changed by switching input method, but code page of a program can not change.
http://bugs.winehq.org/show_bug.cgi?id=35592
Qian Hong fracting@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fracting@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=35592
--- Comment #1 from Qian Hong fracting@gmail.com --- Hi Huang Wei,
Thanks for reporting, could you provide the source code and the binary of your test case (with compile command line)? You could use the 'Add an attachment' link to upload source and binary.
http://bugs.winehq.org/show_bug.cgi?id=35592
--- Comment #2 from Huang Wei hwei.sy@gmail.com --- Created attachment 47538 --> http://bugs.winehq.org/attachment.cgi?id=47538 VS2010 project
When compiled in multi-byte character set. System language should be Chinese.
http://bugs.winehq.org/show_bug.cgi?id=35592
--- Comment #3 from Huang Wei hwei.sy@gmail.com --- Created attachment 47539 --> http://bugs.winehq.org/attachment.cgi?id=47539 test_ime.exe compiled in multi-byte character set. (GBK)
http://bugs.winehq.org/show_bug.cgi?id=35592
--- Comment #4 from Huang Wei hwei.sy@gmail.com --- Created attachment 47540 --> http://bugs.winehq.org/attachment.cgi?id=47540 test_ime.exe compiled in unicode character set.
http://bugs.winehq.org/show_bug.cgi?id=35592
--- Comment #5 from Huang Wei hwei.sy@gmail.com --- In case of source code decoding error, let me paste comment of line 54 here: // 0x54c8 is UTF-16 of '哈'
http://bugs.winehq.org/show_bug.cgi?id=35592
lizhenbo litimetal@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |litimetal@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=35592
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase
--- Comment #6 from Austin English austinenglish@gmail.com --- This is your friendly reminder that there has been no bug activity for over a year. Is this still an issue in current (1.7.37 or newer) wine? If so, please attach the terminal output in 1.7.37 (see http://wiki.winehq.org/FAQ#get_log).
https://bugs.winehq.org/show_bug.cgi?id=35592
Zhiyi Zhang yi.gd.cn@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |yi.gd.cn@gmail.com
--- Comment #7 from Zhiyi Zhang yi.gd.cn@gmail.com --- In wine-3.3, GetKeyboardLayout returns 0x0804. It should be fixed