msvcrt: Add TrailBytes-info for codepage 1361.

David Hedberg david.hedberg at gmail.com
Mon Feb 22 23:43:12 CST 2010


---
 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);
 }
 
-- 
1.7.0




More information about the wine-patches mailing list