Author: atsushi
Date: 2005-07-14 04:12:53 -0400 (Thu, 14 Jul 2005)
New Revision: 47293
Modified:
trunk/mcs/class/corlib/Mono.Globalization.Unicode/ChangeLog
trunk/mcs/class/corlib/Mono.Globalization.Unicode/SimpleCollator.cs
trunk/mcs/class/corlib/Mono.Globalization.Unicode/create-mscompat-collation-table.cs
trunk/mcs/class/corlib/Test/System.Globalization/ChangeLog
trunk/mcs/class/corlib/Test/System.Globalization/CompareInfoTest.cs
Log:
2005-07-14 Atsushi Enomoto <[EMAIL PROTECTED]>
* create-mscompat-collation-table.cs : fixed U+FF9F diacritical weight.
* SimpleCollator.cs : handle U+FF9E and U+FF9F as extenders.
* CompareInfoTest.cs : some special weight tests got working.
Commented on some FIXME tests why they are so.
Modified: trunk/mcs/class/corlib/Mono.Globalization.Unicode/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Mono.Globalization.Unicode/ChangeLog 2005-07-14
07:36:22 UTC (rev 47292)
+++ trunk/mcs/class/corlib/Mono.Globalization.Unicode/ChangeLog 2005-07-14
08:12:53 UTC (rev 47293)
@@ -1,5 +1,10 @@
2005-07-14 Atsushi Enomoto <[EMAIL PROTECTED]>
+ * create-mscompat-collation-table.cs : fixed U+FF9F diacritical weight.
+ * SimpleCollator.cs : handle U+FF9E and U+FF9F as extenders.
+
+2005-07-14 Atsushi Enomoto <[EMAIL PROTECTED]>
+
* SimpleCollator.cs : Now FilterExtender() handles all extender
support. IndexOf() and LastIndexOf() now supports extenders.
IndexOf() and LastIndexOf() did not proceed contraction source
Modified: trunk/mcs/class/corlib/Mono.Globalization.Unicode/SimpleCollator.cs
===================================================================
--- trunk/mcs/class/corlib/Mono.Globalization.Unicode/SimpleCollator.cs
2005-07-14 07:36:22 UTC (rev 47292)
+++ trunk/mcs/class/corlib/Mono.Globalization.Unicode/SimpleCollator.cs
2005-07-14 08:12:53 UTC (rev 47293)
@@ -507,10 +507,18 @@
if (i < 0x3005 || i > 0xFF70)
return ExtenderType.None;
- if (i == 0xFE7C || i == 0xFE7D)
- return ExtenderType.Simple;
- if (i == 0xFF70)
- return ExtenderType.Conditional;
+ if (i >= 0xFE7C) {
+ switch (i) {
+ case 0xFE7C:
+ case 0xFE7D:
+ return ExtenderType.Simple;
+ case 0xFF70:
+ return ExtenderType.Conditional;
+ case 0xFF9E:
+ case 0xFF9F:
+ return ExtenderType.Voiced;
+ }
+ }
if (i > 0x30FE)
return ExtenderType.None;
switch (i) {
Modified:
trunk/mcs/class/corlib/Mono.Globalization.Unicode/create-mscompat-collation-table.cs
===================================================================
---
trunk/mcs/class/corlib/Mono.Globalization.Unicode/create-mscompat-collation-table.cs
2005-07-14 07:36:22 UTC (rev 47292)
+++
trunk/mcs/class/corlib/Mono.Globalization.Unicode/create-mscompat-collation-table.cs
2005-07-14 08:12:53 UTC (rev 47293)
@@ -1759,7 +1759,7 @@
for (int i = 0x3099; i <= 0x309C; i++)
map [i] = new CharMapEntry (1, 1, 1);
map [0xFF9E] = new CharMapEntry (1, 1, 1);
- map [0xFF9F] = new CharMapEntry (1, 1, 1);
+ map [0xFF9F] = new CharMapEntry (1, 1, 2);
map [0x309D] = new CharMapEntry (0xFF, 0xFF, 1);
map [0x309E] = new CharMapEntry (0xFF, 0xFF, 1);
for (int i = 0x30FC; i <= 0x30FE; i++)
Modified: trunk/mcs/class/corlib/Test/System.Globalization/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Globalization/ChangeLog 2005-07-14
07:36:22 UTC (rev 47292)
+++ trunk/mcs/class/corlib/Test/System.Globalization/ChangeLog 2005-07-14
08:12:53 UTC (rev 47293)
@@ -1,5 +1,10 @@
2005-07-14 Atsushi Enomoto <[EMAIL PROTECTED]>
+ * CompareInfoTest.cs : some special weight tests got working.
+ Commented on some FIXME tests why they are so.
+
+2005-07-14 Atsushi Enomoto <[EMAIL PROTECTED]>
+
* CompareInfoTest.cs : Added extender tests for GetSortKey(),
Compare(), IsPrefix(), IndexOf() and LastIndexOf().
Modified: trunk/mcs/class/corlib/Test/System.Globalization/CompareInfoTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Globalization/CompareInfoTest.cs
2005-07-14 07:36:22 UTC (rev 47292)
+++ trunk/mcs/class/corlib/Test/System.Globalization/CompareInfoTest.cs
2005-07-14 08:12:53 UTC (rev 47293)
@@ -290,7 +290,7 @@
AssertSortKey ("#8", new byte [] {
0xE, 2, 6, 0x82, 1, 1, 1, 1, 0},
"a-", CompareOptions.StringSort);
- // FIXME: not working
+ // FIXME: not working (table fix is required)
// AssertSortKey ("#9", new byte [] {
// 0xE, 2, 6, 0x82, 1, 1, 2, 0x3, 1, 1, 0},
// "a\uFF0D", CompareOptions.StringSort);
@@ -327,7 +327,7 @@
0xE, 0x21, 1, 0x13, 1, 1, 1, 0}, "e\u0308");
AssertSortKey ("#i4", new byte [] {
0xE, 0x21, 1, 0x1F, 1, 1, 1, 0}, "e\u0308\u0301");
- // FIXME: not working
+ // FIXME: not working (table fix is required)
// AssertSortKey ("#i5", new byte [] {
// 0xE, 0x21, 1, 0x16, 1, 1, 1, 0}, "e\u0344");
AssertSortKey ("#i6", new byte [] {
@@ -352,7 +352,7 @@
// AssertSortKey ("#i13", new byte [] {
// 0xE, 0x2, 1, 0xB, 1, 12, 1, 1, 0},
// "A\u0302\u0320\u0320\u0320");
- // FIXME: not working
+ // FIXME: not working (table fix is required)
// AssertSortKey ("#i14", new byte [] {
// 0xE, 0x2, 1, 0xF2, 1, 0x12, 1, 1, 0},
// "A\u20E1");
@@ -543,7 +543,7 @@
AssertSortKey ("#i2", new byte [] {
0x1E, 7, 1, 3, 1, 1, 1, 0},
"\u0E01\u0E3B");
-// FIXME: not working
+// FIXME: not working (table fix required)
// AssertSortKey ("#i6", new byte [] {
// 0x1E, 7, 0xA, 0xF9, 1, 3, 1, 1, 1, 0},
// "\u0E01\u0E3F");
@@ -562,7 +562,7 @@
AssertSortKey ("#i11", new byte [] {
0x1E, 7, 0x1E, 6, 1, 3, 3, 1, 1, 1, 0},
"\u0E01\u0E44");
-// FIXME: not working
+// FIXME: not working (table fix required)
/*
AssertSortKey ("#i12", new byte [] {
0x1E, 7, 0x1F, 0x29, 1, 3, 3, 1, 1, 1, 0},
@@ -724,15 +724,13 @@
// Japanese (in invariant)
AssertCompare ("#1", 1, "\u30D1\u30FC\u30B9",
"\uFF8A\uFF9F\uFF70\uFF7D");
- // FIXME: not working
-// AssertCompare ("#2", 0, "\u30D1\u30FC\u30B9",
"\uFF8A\uFF9F\uFF70\uFF7D", CompareOptions.IgnoreWidth);
+ AssertCompare ("#2", 0, "\u30D1\u30FC\u30B9",
"\uFF8A\uFF9F\uFF70\uFF7D", CompareOptions.IgnoreWidth);
AssertCompare ("#3", 0, "\uFF80\uFF9E\uFF72\uFF8C\uFF9E",
"\u30C0\u30A4\u30D6", CompareOptions.IgnoreWidth);
AssertCompare ("#4", 1, "\u3042\u309D", "\u3042\u3042");
AssertCompare ("#5", 0, "\u3042\u309D", "\u3042\u3042",
CompareOptions.IgnoreNonSpace);
- // FIXME: not working
-// AssertCompare ("#6", 0, "\uFF8A\uFF9E\uFF70\uFF99",
-// "\u30D0\u30FC\u30EB", CompareOptions.IgnoreWidth);
+ AssertCompare ("#6", 0, "\uFF8A\uFF9E\uFF70\uFF99",
+ "\u30D0\u30FC\u30EB", CompareOptions.IgnoreWidth);
// extender in target
AssertCompare ("#7", -1, "\u30D1\u30A2", "\u30D1\u30FC");
@@ -825,15 +823,13 @@
// Japanese (in invariant)
AssertIsPrefix ("#1", false, "\u30D1\u30FC\u30B9",
"\uFF8A\uFF9F\uFF70\uFF7D");
- // FIXME: not working
-// AssertIsPrefix ("#2", true, "\u30D1\u30FC\u30B9",
"\uFF8A\uFF9F\uFF70\uFF7D", CompareOptions.IgnoreWidth);
+ AssertIsPrefix ("#2", true, "\u30D1\u30FC\u30B9",
"\uFF8A\uFF9F\uFF70\uFF7D", CompareOptions.IgnoreWidth);
AssertIsPrefix ("#3", true, "\uFF80\uFF9E\uFF72\uFF8C\uFF9E",
"\u30C0\u30A4\u30D6", CompareOptions.IgnoreWidth);
AssertIsPrefix ("#4", false, "\u3042\u309D", "\u3042\u3042");
AssertIsPrefix ("#5", true, "\u3042\u309D", "\u3042\u3042",
CompareOptions.IgnoreNonSpace);
- // FIXME: not working
-// AssertIsPrefix ("#6", true, "\uFF8A\uFF9E\uFF70\uFF99",
-// "\u30D0\u30FC\u30EB", CompareOptions.IgnoreWidth);
+ AssertIsPrefix ("#6", true, "\uFF8A\uFF9E\uFF70\uFF99",
+ "\u30D0\u30FC\u30EB", CompareOptions.IgnoreWidth);
// extender in target
AssertIsPrefix ("#7", false, "\u30D1\u30A2", "\u30D1\u30FC");
@@ -914,9 +910,8 @@
AssertIndexOf ("#1-3", 0, "\u30D1\u30A2", "\u30D1\u30FC",
CompareOptions.IgnoreNonSpace);
// extender in source
AssertIndexOf ("#1-4", 0, "\u30D1\u30FC", "\u30D1\u30A2",
CompareOptions.IgnoreNonSpace);
-
// FIXME: not working
-// AssertIndexOf ("#2", true, "\u30D1\u30FC\u30B9",
"\uFF8A\uFF9F\uFF70\uFF7D", CompareOptions.IgnoreWidth);
+// AssertIndexOf ("#2", 0, "\u30D1\u30FC\u30B9",
"\uFF8A\uFF9F\uFF70\uFF7D", CompareOptions.IgnoreWidth);
// FIXME: not working
// AssertIndexOf ("#3", 0, "\uFF80\uFF9E\uFF72\uFF8C\uFF9E",
// "\u30C0\u30A4\u30D6", CompareOptions.IgnoreWidth);
@@ -967,9 +962,8 @@
AssertLastIndexOf ("#1-3", 0, "\u30D1\u30A2", "\u30D1\u30FC",
CompareOptions.IgnoreNonSpace);
// extender in source
AssertLastIndexOf ("#1-4", 0, "\u30D1\u30FC", "\u30D1\u30A2",
CompareOptions.IgnoreNonSpace);
-
// FIXME: not working
-// AssertLastIndexOf ("#2", true, "\u30D1\u30FC\u30B9",
"\uFF8A\uFF9F\uFF70\uFF7D", CompareOptions.IgnoreWidth);
+// AssertLastIndexOf ("#2", 0, "\u30D1\u30FC\u30B9",
"\uFF8A\uFF9F\uFF70\uFF7D", CompareOptions.IgnoreWidth);
// FIXME: not working
// AssertLastIndexOf ("#3", 0, "\uFF80\uFF9E\uFF72\uFF8C\uFF9E",
// "\u30C0\u30A4\u30D6", CompareOptions.IgnoreWidth);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches