2005-07-13 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Wed, 13 Jul 2005 08:14:56 +0000 (08:14 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Wed, 13 Jul 2005 08:14:56 +0000 (08:14 -0000)
* create-mscompat-collation-table.cs : ja CJK ideograph got completed.

svn path=/trunk/mcs/; revision=47255

mcs/class/corlib/Mono.Globalization.Unicode/ChangeLog
mcs/class/corlib/Mono.Globalization.Unicode/TestDriver.cs
mcs/class/corlib/Mono.Globalization.Unicode/create-mscompat-collation-table.cs

index febca34d83211bba2712b3961da8fd9064732863..819b9f5ab0fa5f249d37f69f832e21464fddd184 100644 (file)
@@ -1,3 +1,7 @@
+2005-07-13  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * create-mscompat-collation-table.cs : ja CJK ideograph got completed.
+
 2005-07-13  Atsushi Enomoto  <atsushi@ximian.com>
 
        * create-mscompat-collation-table.cs : Fixed CJK custom Japanese
index 00e108c4447cf790375d76fa8b43e1a04c03ef89..0bb217d60d53c494818e5eeb52fec2c4acf63c1d 100644 (file)
@@ -34,9 +34,9 @@ namespace Mono.Globalization.Unicode
 //IsSuffix ("ae", "\u00E6", CompareOptions.None);
 //LastIndexOf ("AE", "A", 1, 2, CompareOptions.None);
 //LastIndexOf ("\u00C6", "AE", CompareOptions.None);
-//DumpSortKey ("\u4E03\u4E09");
-//coll = new SimpleCollator (new CultureInfo ("ja"));
-//DumpSortKey ("\u4E03\u4E09");
+DumpSortKey ("\u4E03\u4E09");
+coll = new SimpleCollator (new CultureInfo ("ja"));
+DumpSortKey ("\u4E03\u4E09");
 //return;
                        /*
                        DumpSortKey ("AE");
index 9231e860fbab6cd7e532eff8323b2faf22ea7571..a510f6822eb19b9efc5be0facb44a92c9b4dabf4 100644 (file)
@@ -1439,8 +1439,6 @@ throw new Exception (String.Format ("Should not happen. weights are {0} while la
                        category = "ja";
                        arr = cjkJA;
                        offset = 0;//char.MaxValue - arr.Length;
-                       doc.Load (jaXML);
-                       s = doc.SelectSingleNode ("/ldml/collations/collation/rules/pc").InnerText;
 
                        // SPECIAL CASES
                        arr [0x4EDD] = 0x8002; // Chinese repetition mark?
@@ -1450,7 +1448,11 @@ throw new Exception (String.Format ("Should not happen. weights are {0} while la
                        arr [0x337C] = 0x8007;
 
                        v = 0x8008;
-                       foreach (char c in s) {
+                       foreach (JISCharacter jc in jisJapanese) {
+                               if (jc.JIS < 0x8800)
+                                       continue;
+                               char c = (char) jc.CP;
+
                                if (c < '\u4E00')
                                        Console.Error.WriteLine ("---- warning: for {0} {1:X04} is omitted which should be {2:X04}", category, (int) c, v);
                                else {
@@ -1473,8 +1475,8 @@ throw new Exception (String.Format ("Should not happen. weights are {0} while la
                                        // FIXME: there are still remaining
                                        // characters after U+FA0C.
 //                                     for (int k = 0; k < char.MaxValue; k++) {
-                                       for (int k = 0; k < '\uFA0C'; k++) {
-                                               if (decompIndex [k] == 0)
+                                       for (int k = 0; k < '\uFA0D'; k++) {
+                                               if (decompIndex [k] == 0 || IsIgnorable (k))
                                                        continue;
                                                if (decompValues [decompIndex [k]] == c /*&&
                                                        decompLength [k] == 1*/ ||
@@ -1573,7 +1575,7 @@ throw new Exception (String.Format ("Should not happen. weights are {0} while la
                        decompLength [0xFA0C] = 1;
                        decompIndex [0xF929] = decompLength [0xF929] = 0;
 
-                       decompIndex [0xF92C] = decompLength [0xF92C] = 0;
+                       decompValues [decompIndex [0xF92C]] = 0x90DE;
                }
 
                void ModifyParsedValues ()