mktables: Add table for chars with multi-char fold
authorKarl Williamson <public@khwilliamson.com>
Fri, 12 Oct 2012 15:10:10 +0000 (09:10 -0600)
committerKarl Williamson <public@khwilliamson.com>
Sun, 14 Oct 2012 15:03:36 +0000 (09:03 -0600)
This will be used in a later commit

lib/unicore/mktables

index 633686f..7e41e29 100644 (file)
@@ -11487,6 +11487,7 @@ sub filter_old_style_case_folding {
     # Create the map for simple only if are going to output it, for otherwise
     # it takes no part in anything we do.
     my $to_output_simple;
+    my $multi_char_folds;
     my $non_final_folds;
     my $all_folds;
 
@@ -11501,6 +11502,11 @@ sub filter_old_style_case_folding {
             property_ref('Case_Folding')->set_proxy_for('Simple_Case_Folding');
         }
 
+        $multi_char_folds = $perl->add_match_table("_Perl_Multi_Char_Folds",
+                            Perl_Extension => 1,
+                            Fate => $INTERNAL_ONLY,
+                            Description => "Code points that fold to more than one character",
+                            );
         $non_final_folds = $perl->add_match_table("_Perl_Non_Final_Folds",
                            Perl_Extension => 1,
                            Fate => $INTERNAL_ONLY,
@@ -11567,7 +11573,8 @@ END
         # so that _swash_inversion_hash() is able to construct closures
         # without having to worry about F mappings.
         if ($type eq 'C' || $type eq 'F' || $type eq 'I' || $type eq 'S') {
-            $all_folds->add_range(hex $range, hex $range);  # Assumes range is single
+            my $from = hex $range;  # Assumes range is single
+            $all_folds->add_range($from, $from);
             $_ = "$range; Case_Folding; "
                  . "$CMD_DELIM$REPLACE_CMD=$MULTIPLE_BEFORE$CMD_DELIM$map";
 
@@ -11578,6 +11585,7 @@ END
                     $non_final_folds->add_range($decimal, $decimal);
                     $all_folds->add_range($decimal, $decimal);
                 }
+                $multi_char_folds->add_range($from, $from);
             }
             else {
                 $all_folds->add_range(hex $map, hex $map);