http://bugs.winehq.org/show_bug.cgi?id=19429
Summary: WideCharToMultiByte: Incorrect conversion of "default character" Product: Wine Version: unspecified Platform: PC-x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: dee@bowfive.oag.co.jp
Created an attachment (id=22553) --> (http://bugs.winehq.org/attachment.cgi?id=22553) The C program which can reproduce the problem
I found that WideCharToMultiByte() converts "default character" incorrectly in 932 (Japanese SHIFT-JIS) code page.
Attached C program can reproduce the problem (The binary attached is compiled using Borland C++ Compiler 5.5.1).
On Windows XP Professional(32bit,SP3,Japanese), it produces following output (and is what I expect):
Y:\dbcstest>test 0123?456789
On Wine 1.1.26 running on Ubuntu Jaunty(9.04) x86_64, it produces:
$ wine test.exe 0123$$456789
http://bugs.winehq.org/show_bug.cgi?id=19429
--- Comment #1 from Takahiro Watanabe dee@bowfive.oag.co.jp 2009-07-23 09:12:25 --- Created an attachment (id=22554) --> (http://bugs.winehq.org/attachment.cgi?id=22554) The binary compiled with BCC5.5.1.
http://bugs.winehq.org/show_bug.cgi?id=19429
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase
http://bugs.winehq.org/show_bug.cgi?id=19429
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #22553|text/x-csrc |text/plain mime type| |
http://bugs.winehq.org/show_bug.cgi?id=19429
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.1.26
http://bugs.winehq.org/show_bug.cgi?id=19429
--- Comment #2 from Takahiro Watanabe dee@bowfive.oag.co.jp 2009-07-24 00:08:46 --- I guess ... (sorry I only have checked this by viewing the source, not on the running code):
is_valid_dbcs_mapping() in libs/wine/wctomb.c:
There is a condition expression checking for default chars;
if (ch == table->info.def_char && wch != table->info.def_unicode_char) return 0;
table->info.def_char becomes '?' (0x3f) and table->info.def_unicode_char is U+30FB, as described in 'struct dbcs_table cptable_932' in libs/wine/c_932.c .
So if ch='?' and wch=L'?' (both numerically are 0x3f), this function returns zero, indicating that the DBCS mapping is invalid.
http://bugs.winehq.org/show_bug.cgi?id=19429
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #3 from Alexandre Julliard julliard@winehq.org 2009-07-24 08:53:40 --- Thanks for the good report. Should be fixed by 464c956a0a0c81d3871362630e0647a5c1ebd010.
http://bugs.winehq.org/show_bug.cgi?id=19429
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org 2009-08-07 12:59:42 --- Closing bugs fixed in 1.1.27.
http://bugs.winehq.org/show_bug.cgi?id=19429
thtfpcuser thtfpcuser@126.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |thtfpcuser@126.com