mktables: Accommodate new @missings in Unicode 6.1
authorKarl Williamson <public@khwilliamson.com>
Tue, 27 Dec 2011 17:51:58 +0000 (10:51 -0700)
committerKarl Williamson <public@khwilliamson.com>
Fri, 30 Dec 2011 04:11:50 +0000 (21:11 -0700)
The Unicode 6.1 release candidate includes a new @missings line for the
ScriptExtenstions.txt file which we need to know about and deal with.

lib/unicore/mktables

index 3e3b666..83c15d4 100644 (file)
@@ -2434,7 +2434,8 @@ END
                         || @defaults > 2
                         || ($default =~ /^</
                             && $default !~ /^<code *point>$/i
-                            && $default !~ /^<none>$/i))
+                            && $default !~ /^<none>$/i
+                            && $default !~ /^<script>$/i))
                     {
                         $self->carp_bad_line("Unrecognized \@missing line: $_.  Assuming no missing entries");
                     }
@@ -2455,6 +2456,15 @@ END
                         elsif ($default =~ /^<code *point>$/i) {
                             $default = $CODE_POINT;
                         }
+                        elsif ($default =~ /^<script>$/i) {
+
+                            # Special case this one.  Currently is from
+                            # ScriptExtensions.txt, and means for all unlisted
+                            # code points, use their Script property values.
+                            # For the code points not listed in that file, the
+                            # default value is 'Unknown'.
+                            $default = "Unknown";
+                        }
 
                         # Store them as a sub-arrays with both components.
                         push @{$missings{$addr}}, [ $default, $property ];