mktables: force code point tables are range size 1
authorKarl Williamson <public@khwilliamson.com>
Thu, 3 Mar 2011 05:14:24 +0000 (22:14 -0700)
committerKarl Williamson <public@khwilliamson.com>
Thu, 3 Mar 2011 05:32:22 +0000 (22:32 -0700)
As stated in the comment, the Perl core is expecting a different
range value definition than this program outputs.  But this isn't a
problem if the range size is set to 1.  Currently the core only reads in
tables that map to code points, so do it only for them.

lib/unicore/mktables

index bb54843..c0ad2f1 100644 (file)
@@ -6278,6 +6278,12 @@ END
 
         $self->_set_format($format);
 
+        # Core Perl has a different definition of mapping ranges than we do,
+        # that is applicable mainly to mapping code points, so for tables
+        # where it is possible that core Perl could be used to read it,
+        # make it range size 1 to prevent possible confusion
+        $self->set_range_size_1(1) if $format eq $HEX_FORMAT;
+
         return $self->SUPER::write(
             ($self->property == $block)
                 ? 7     # block file needs more tab stops