kernel32: Set C3_KASHIDA only for kashida character.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-05-15 10:30:33 +03:00 committed by Alexandre Julliard
parent 73f7bf57cb
commit 632266e5b5
2 changed files with 13 additions and 1 deletions

View file

@ -2864,7 +2864,7 @@ BOOL WINAPI GetStringTypeW( DWORD type, LPCWSTR src, INT count, LPWORD chartype
if ((c>=0x30A0)&&(c<=0x30FF)) type3 |= C3_KATAKANA;
if ((c>=0x3040)&&(c<=0x309F)) type3 |= C3_HIRAGANA;
if ((c>=0x4E00)&&(c<=0x9FAF)) type3 |= C3_IDEOGRAPH;
if ((c>=0x0600)&&(c<=0x06FF)) type3 |= C3_KASHIDA;
if (c == 0x0640) type3 |= C3_KASHIDA;
if ((c>=0x3000)&&(c<=0x303F)) type3 |= C3_SYMBOL;
if ((c>=0xD800)&&(c<=0xDBFF)) type3 |= C3_HIGHSURROGATE;

View file

@ -3766,6 +3766,18 @@ static void test_GetStringTypeW(void)
GetStringTypeW(CT_CTYPE1, ch, 2, types);
ok(types[0] == (C1_DEFINED|C1_SPACE), "got %x\n", types[0]);
ok(types[1] == (C1_DEFINED|C1_SPACE), "got %x\n", types[1]);
/* check Arabic range for kashida flag */
for (ch[0] = 0x600; ch[0] <= 0x6ff; ch[0] += 1)
{
types[0] = 0;
ret = GetStringTypeW(CT_CTYPE3, ch, 1, types);
ok(ret, "%#x: failed %d\n", ch[0], ret);
if (ch[0] == 0x640) /* ARABIC TATWEEL (Kashida) */
ok(types[0] & C3_KASHIDA, "%#x: type %#x\n", ch[0], types[0]);
else
ok(!(types[0] & C3_KASHIDA), "%#x: type %#x\n", ch[0], types[0]);
}
}
static void test_IdnToNameprepUnicode(void)