From 822ebcc8f363a229da6a08b4a4a413d4e93e0fb9 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Wed, 27 Mar 2002 20:52:19 +0000 Subject: Start using the Unicode 3.2.0 data (NOTE: still unofficial, but the data is unlikely to change much. Doublecheck when 3.2.0 gets released.) p4raw-id: //depot/perl@15552 --- lib/Unicode/UCD.pm | 8 +++----- lib/Unicode/UCD.t | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'lib/Unicode') diff --git a/lib/Unicode/UCD.pm b/lib/Unicode/UCD.pm index 9dabc5dec6..96dee9a816 100644 --- a/lib/Unicode/UCD.pm +++ b/lib/Unicode/UCD.pm @@ -494,7 +494,7 @@ sub _compexcl { unless (%COMPEXCL) { if (openunicode(\$COMPEXCLFH, "CompositionExclusions.txt")) { while (<$COMPEXCLFH>) { - if (/^([0-9A-F]+) \# /) { + if (/^([0-9A-F]+)\s+\#\s+/) { my $code = hex($1); $COMPEXCL{$code} = undef; } @@ -658,9 +658,9 @@ sub _casespec { title upper condition)}; - my ($oldlocale) = + if (defined $oldcondition) { + my ($oldlocale) = ($oldcondition =~ /^([a-z][a-z](?:_\S+)?)/); - if (defined $oldlocale) { delete $CASESPEC{$code}; $CASESPEC{$code}->{$oldlocale} = { code => $hexcode, @@ -668,8 +668,6 @@ sub _casespec { title => $oldtitle, upper => $oldupper, condition => $oldcondition }; - } else { - warn __PACKAGE__, ": SpecialCasing.txt:", $., ": No oldlocale for 0x$hexcode\n" } } my ($locale) = diff --git a/lib/Unicode/UCD.t b/lib/Unicode/UCD.t index 5b1f36e741..0e1550e289 100644 --- a/lib/Unicode/UCD.t +++ b/lib/Unicode/UCD.t @@ -231,7 +231,7 @@ ok( charinrange($ranges, "13a0")); ok( charinrange($ranges, "13f4")); ok(!charinrange($ranges, "13f5")); -is(Unicode::UCD::UnicodeVersion, '3.1.1', 'UnicodeVersion'); +is(Unicode::UCD::UnicodeVersion, '3.2.0', 'UnicodeVersion'); use Unicode::UCD qw(compexcl); @@ -276,5 +276,5 @@ ok($casespec->{az}->{code} eq '0307' && $casespec->{az}->{lower} eq '' && $casespec->{az}->{title} eq '0307' && $casespec->{az}->{upper} eq '0307' && - $casespec->{az}->{condition} eq 'az AFTER_i NOT_MORE_ABOVE', + $casespec->{az}->{condition} eq 'az After_Soft_Dotted', 'casespec 0x307'); -- cgit v1.2.1