David Hedberg : msvcrt: Add trail bytes info for codepage 1361.

Alexandre Julliard julliard at winehq.org
Tue Feb 23 11:17:23 CST 2010


Module: wine
Branch: master
Commit: 85cc5dd1b2c78ecb233ce8d73464c384524b765b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=85cc5dd1b2c78ecb233ce8d73464c384524b765b

Author: David Hedberg <david.hedberg at gmail.com>
Date:   Tue Feb 23 06:43:12 2010 +0100

msvcrt: Add trail bytes info for codepage 1361.

---

 dlls/msvcrt/mbcs.c         |    1 +
 dlls/msvcrt/tests/string.c |   23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c
index f738bcf..f4bb248 100644
--- a/dlls/msvcrt/mbcs.c
+++ b/dlls/msvcrt/mbcs.c
@@ -48,6 +48,7 @@ static struct cp_extra_info_t g_cpextrainfo[] =
     {936, {0x40, 0xfe, 0, 0}},
     {949, {0x41, 0xfe, 0, 0}},
     {950, {0x40, 0x7e, 0xa1, 0xfe, 0, 0}},
+    {1361, {0x31, 0x7e, 0x81, 0xfe, 0, 0}},
     {20932, {1, 255, 0, 0}},  /* seems to give different results on different systems */
     {0, {1, 255, 0, 0}}       /* match all with FIXME */
 };
diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c
index 8544735..182c598 100644
--- a/dlls/msvcrt/tests/string.c
+++ b/dlls/msvcrt/tests/string.c
@@ -345,6 +345,29 @@ static void test_mbcp(void)
     else
         skip("Current locale has double-byte charset - could leave to false positives\n");
 
+    _setmbcp(1361);
+    expect_eq(_ismbblead(0x80), 0, int, "%d");
+    todo_wine {
+      expect_eq(_ismbblead(0x81), 1, int, "%d");
+      expect_eq(_ismbblead(0x83), 1, int, "%d");
+    }
+    expect_eq(_ismbblead(0x84), 1, int, "%d");
+    expect_eq(_ismbblead(0xd3), 1, int, "%d");
+    expect_eq(_ismbblead(0xd7), 0, int, "%d");
+    todo_wine {
+      expect_eq(_ismbblead(0xd8), 1, int, "%d");
+    }
+    expect_eq(_ismbblead(0xd9), 1, int, "%d");
+
+    expect_eq(_ismbbtrail(0x30), 0, int, "%d");
+    expect_eq(_ismbbtrail(0x31), 1, int, "%d");
+    expect_eq(_ismbbtrail(0x7e), 1, int, "%d");
+    expect_eq(_ismbbtrail(0x7f), 0, int, "%d");
+    expect_eq(_ismbbtrail(0x80), 0, int, "%d");
+    expect_eq(_ismbbtrail(0x81), 1, int, "%d");
+    expect_eq(_ismbbtrail(0xfe), 1, int, "%d");
+    expect_eq(_ismbbtrail(0xff), 0, int, "%d");
+
     _setmbcp(curr_mbcp);
 }
 




More information about the wine-cvs mailing list