From 86a52d1e18f484975c71fbe218ac47c00e6d0fd9 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Fri, 4 Nov 2011 15:32:47 -0600 Subject: [PATCH] mktables: Add %string_property_loose_to_name for UCD.pl --- lib/unicore/mktables | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/unicore/mktables b/lib/unicore/mktables index 550f636..e11ab85 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -1250,6 +1250,7 @@ my %nv_floating_to_rational; # maps numeric values floating point numbers to # their rational equivalent my %loose_property_name_of; # Loosely maps (non_string) property names to # standard form +my %string_property_loose_to_name; # Same, for string properties. my %loose_to_standard_value; # loosely maps table names to the canonical # alias for them @@ -14265,6 +14266,10 @@ sub make_UCD () { = simple_dumper(\%loose_to_standard_value, ' ' x 4); chomp $loose_to_standard_value; + my $string_property_loose_to_name + = simple_dumper(\%string_property_loose_to_name, ' ' x 4); + chomp $string_property_loose_to_name; + my $perlprop_to_aliases = simple_dumper(\%perlprop_to_aliases, ' ' x 4); chomp $perlprop_to_aliases; @@ -14287,6 +14292,11 @@ $INTERNAL_ONLY_HEADER $loose_to_standard_value ); +# String property loose names to standard loose name +\%Unicode::UCD::string_property_loose_to_name = ( +$string_property_loose_to_name +); + # Keys are Perl extensions in loose form; values are each one's list of # aliases \%Unicode::UCD::loose_perlprop_to_name = ( @@ -14578,7 +14588,13 @@ sub write_all_tables() { # For utf8_heavy, set the mapping of the alias to the # property - if ($type != $STRING) { + if ($type == $STRING) { + if ($property->fate <= $MAP_PROXIED) { + $string_property_loose_to_name{$alias_standard} + = $standard_property_name; + } + } + else { if (exists ($loose_property_name_of{$alias_standard})) { Carp::my_carp("There already is a property with the same standard name as $alias_name: $loose_property_name_of{$alias_standard}. Old name is retained"); -- 2.7.4