msvcrt:string Fix codepage table 1361 (Korean Johab) [try3]
Alexandre Goujon
ale.goujon at gmail.com
Thu Sep 2 06:32:04 CDT 2010
Thanks for your comment on the try2.
---
dlls/msvcrt/tests/string.c | 12 ++++--------
libs/wine/cpmap.pl | 11 ++++++++++-
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c
index ac157c3..0ee7135 100644
--- a/dlls/msvcrt/tests/string.c
+++ b/dlls/msvcrt/tests/string.c
@@ -354,16 +354,12 @@ static void test_mbcp(void)
_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(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(0xd8), 1, int, "%d");
expect_eq(_ismbblead(0xd9), 1, int, "%d");
expect_eq(_ismbbtrail(0x30), 0, int, "%d");
@@ -829,7 +825,7 @@ static void test_ismbclegal(void) {
break;
}
}
- todo_wine ok(!err, "_ismbclegal (1361) : Expected 0x%x, got 0x%x (0x%x)\n", exp, ret, i);
+ ok(!err, "_ismbclegal (1361) : Expected 0x%x, got 0x%x (0x%x)\n", exp, ret, i);
_setmbcp(prev_cp);
}
diff --git a/libs/wine/cpmap.pl b/libs/wine/cpmap.pl
index 79f5fd5..e36ea62 100755
--- a/libs/wine/cpmap.pl
+++ b/libs/wine/cpmap.pl
@@ -1527,6 +1527,7 @@ sub handle_bestfit_file($$$)
sub HANDLE_FILE(@)
{
my ($codepage,$filename,$has_glyphs,$comment) = @_;
+ my @lb_ranges = ();
@cp2uni = ();
@lead_bytes = ();
@@ -1563,8 +1564,16 @@ sub HANDLE_FILE(@)
}
printf OUTPUT "#include \"wine/unicode.h\"\n\n";
+ @lb_ranges = get_lb_ranges();
+
+ if( $codepage == 1361 )
+ {
+ $lb_ranges[0] = 0x81;
+ $lb_ranges[2] = 0xd8;
+ }
+
if (!@lead_bytes) { dump_sbcs_table( $codepage, $has_glyphs, $comment, $DEF_CHAR, $DEF_CHAR ); }
- else { dump_dbcs_table( $codepage, $comment, $DEF_CHAR, $DEF_CHAR, get_lb_ranges() ); }
+ else { dump_dbcs_table( $codepage, $comment, $DEF_CHAR, $DEF_CHAR, @lb_ranges ); }
close OUTPUT;
save_file($output);
}
--
1.7.0.4
More information about the wine-patches
mailing list