MultiByteToWideCharacter problem with CP 950 (Traditional Chinese)

Mike McCormack mike at codeweavers.com
Sat Mar 5 13:49:13 CST 2005


Hi,

I'm working on a problem for a high priority sales ticket in Taiwan who 
wants traditional chinese MS Office.   There's been a problem with 
Traditional Chinese Office in CrossOver that has never been fixed.  I 
had some luck with it tonight...


1st problem: (pre-existing)

If I start Office 2000 Traditional Chinese as follows:

LC_ALL=zh_TW.utf8 wine m:\setup

Then it runs until the product key dialog, then dies with the attached 
error message.  It runs across the string "Appoint|\xb7s\xac\xf9\xb7|", 
which it interprets to have two | characters, because 0xb7 isn't 
recognised as a lead byte.  It determines lead bytes by calling 
MultiByteToWideChar, and the attached test program, which runs without 
output on Windows 2000, fails on Wine.


2nd problem: (regression)

There's another serious problem, which is a regression.  Starting Office 
2000 (any language)with the Big5 code page as below, causes serious 
trouble with my X server (X.org 6.7.0).  The X cpu usage goes to 95%, 
and the install hangs, more or less.

LC_ALL=zh_TW.Big5 wine m:\setup

The problem happens whether or not the Chinese truetype font is installed.

Mike

-------------- next part --------------
void test_dbcs(void)
{
    unsigned char str[0x100];
    WCHAR strW[0x100];
    int i;
    BOOL r;
    LCID zhtw; 
    WCHAR out[] = {
        0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
        16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
        32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
        48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
        64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
        80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
        96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
        112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
        128, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
        63, 65116, 12563, 23427, 22846, 24090, 22411, 38475,
           31203, 25458, 38519, 32110, 28322, 21123, 36958, 34664,
        34691, 35613, 34277, 40810, 63349, 22324, 20334, 36819,
           29631, 26050, 34930, 27446, 36281, 27449, 35416, 26864,
        33902, 25717, 34592, 27145, 36069, 28619, 37646, 33212,
           28692, 22182, 40640, 34332, 34866, 9581, 57655, 57971, 63736
    };

    zhtw = MAKELCID(MAKELANGID(4,1),SORT_DEFAULT);
    SetThreadLocale(zhtw);

    for(i=0; i<0x100; i++)
        str[i] = i;
    r = MultiByteToWideChar(950, 1, str, 0x100, strW, 0x100);
    for(i=0; i<r; i++)
    {
        if(out[i] != strW[i])
            printf("mismatch at %d (%02x)\n",i,i);
    }
}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: o2k-trad-chinese.png
Type: image/png
Size: 66427 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050306/97e63a43/o2k-trad-chinese.png


More information about the wine-patches mailing list