This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mktables: Move some CJK chars out of Name.pl table
authorKarl Williamson <khw@khw-desktop.(none)>
Tue, 13 Jul 2010 22:58:50 +0000 (16:58 -0600)
committerKarl Williamson <khw@khw-desktop.(none)>
Tue, 13 Jul 2010 23:17:55 +0000 (17:17 -0600)
Now that charnames can handle algorithmically determinable character
names, change mktables to put all such into the algorithms it generates
for charnames to use.  For historical reasons, they had been placed in
the large main table.  This patch shortens that table by approximately
1000 names, which should speed up everything.

lib/unicore/mktables

index 82fb1e0..312e682 100644 (file)
@@ -9356,21 +9356,20 @@ END
                 $file->carp_bad_line("Expecting a closing range line, not a $fields[$CHARNAME]'.  Trying anyway");
                 $in_range = 0;
             }
-            # XXX until charnames catches up.
-#            if ($fields[$CHARNAME] =~ s/- $cp $//x) {
-#
-#                # These are code points whose names end in their code points,
-#                # which means the names are algorithmically derivable from the
-#                # code points.  To shorten the output Name file, the algorithm
-#                # for deriving these is placed in the file instead of each
-#                # code point, so they have map type $CP_IN_NAME
-#                $fields[$CHARNAME] = $CMD_DELIM
-#                                 . $MAP_TYPE_CMD
-#                                 . '='
-#                                 . $CP_IN_NAME
-#                                 . $CMD_DELIM
-#                                 . $fields[$CHARNAME];
-#            }
+            if ($fields[$CHARNAME] =~ s/- $cp $//x) {
+
+                # These are code points whose names end in their code points,
+                # which means the names are algorithmically derivable from the
+                # code points.  To shorten the output Name file, the algorithm
+                # for deriving these is placed in the file instead of each
+                # code point, so they have map type $CP_IN_NAME
+                $fields[$CHARNAME] = $CMD_DELIM
+                                 . $MAP_TYPE_CMD
+                                 . '='
+                                 . $CP_IN_NAME
+                                 . $CMD_DELIM
+                                 . $fields[$CHARNAME];
+            }
             $fields[$NAME] = $fields[$CHARNAME];
 
             # Some official names are really two alternate names with one in