From: Jarkko Hietaniemi Date: Sun, 3 Aug 2003 18:27:47 +0000 (+0000) Subject: Upgrade to Unicode::Collate 0.26. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4c8433661f9886ea9928ada6c218e87bb90d6b78;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Unicode::Collate 0.26. p4raw-id: //depot/perl@20452 --- diff --git a/lib/Unicode/Collate.pm b/lib/Unicode/Collate.pm index 4be5aab..fa19afe 100644 --- a/lib/Unicode/Collate.pm +++ b/lib/Unicode/Collate.pm @@ -14,7 +14,7 @@ use File::Spec; require Exporter; -our $VERSION = '0.25'; +our $VERSION = '0.26'; our $PACKAGE = __PACKAGE__; our @ISA = qw(Exporter); @@ -350,16 +350,18 @@ sub parseEntry $k = '[.0000.0000.0000.0000]' if defined $self->{ignoreName} && $name =~ /$self->{ignoreName}/; - my $is_L3_ignorable; + my $is_L3_ignorable = TRUE; foreach my $arr ($k =~ /\[([^\[\]]+)\]/g) { # SPACEs allowed my $var = $arr =~ /\*/; # exactly /^\*/ but be lenient. my @wt = _getHexArray($arr); push @key, pack(VCE_TEMPLATE, $var, @wt); - $is_L3_ignorable = TRUE - if $wt[0] + $wt[1] + $wt[2] == 0; + $is_L3_ignorable = FALSE + if $wt[0] + $wt[1] + $wt[2] != 0; # if $arr !~ /[1-9A-Fa-f]/; NG # Conformance Test shows L3-ignorable is completely ignorable. + # For expansion, an entry $is_L3_ignorable + # if and only if "all" CEs are [.0000.0000.0000]. } $self->{entries}{$entry} = \@key; diff --git a/lib/Unicode/Collate/Changes b/lib/Unicode/Collate/Changes index 92fdfeb..c54933e 100644 --- a/lib/Unicode/Collate/Changes +++ b/lib/Unicode/Collate/Changes @@ -1,5 +1,10 @@ Revision history for Perl module Unicode::Collate. +0.26 Sun Aug 03 22:23:17 2003 + - fix: an expansion in which a CE is level 3 ignorable and others are not + was wrongly made level 3 ignorable as a whole entry. + (In DUCET, some precomposites in Musical Symbols are so) + 0.25 Mon Jun 06 23:20:17 2003 - fix Makefile.PL. - internal tweak (again): pack_U() and unpack_U(). diff --git a/lib/Unicode/Collate/README b/lib/Unicode/Collate/README index 8e4a153..7b555fc 100644 --- a/lib/Unicode/Collate/README +++ b/lib/Unicode/Collate/README @@ -1,4 +1,4 @@ -Unicode/Collate version 0.25 +Unicode/Collate version 0.26 =============================== NAME diff --git a/lib/Unicode/Collate/t/index.t b/lib/Unicode/Collate/t/index.t index 59ad8d7..d6811c7 100644 --- a/lib/Unicode/Collate/t/index.t +++ b/lib/Unicode/Collate/t/index.t @@ -16,6 +16,9 @@ BEGIN { use Test; BEGIN { plan tests => 65 }; + +use strict; +use warnings; use Unicode::Collate; our $IsEBCDIC = ord("A") != 0x41; diff --git a/lib/Unicode/Collate/t/test.t b/lib/Unicode/Collate/t/test.t index 9221f5a..de4ca59 100644 --- a/lib/Unicode/Collate/t/test.t +++ b/lib/Unicode/Collate/t/test.t @@ -15,7 +15,10 @@ BEGIN { } use Test; -BEGIN { plan tests => 194 }; +BEGIN { plan tests => 199 }; + +use strict; +use warnings; use Unicode::Collate; our $IsEBCDIC = ord("A") != 0x41; @@ -594,6 +597,7 @@ $Collator->change(alternate => 'Shifted', level => 4); my $L3ignorable = Unicode::Collate->new( alternate => 'Non-ignorable', + level => 3, table => undef, normalization => undef, entry => <<'ENTRIES', @@ -606,6 +610,10 @@ my $L3ignorable = Unicode::Collate->new( 09C7 ; [.1157.0020.0002.09C7] # BENGALI VOWEL SIGN E 09CB ; [.1159.0020.0002.09CB] # BENGALI VOWEL SIGN O 09C7 09BE ; [.1159.0020.0002.09CB] # BENGALI VOWEL SIGN O +1D1B9 ; [*098A.0020.0002.1D1B9] # MUSICAL SYMBOL SEMIBREVIS WHITE +1D1BA ; [*098B.0020.0002.1D1BA] # MUSICAL SYMBOL SEMIBREVIS BLACK +1D1BB ; [*098A.0020.0002.1D1B9][.0000.0000.0000.1D165] # M.S. MINIMA +1D1BC ; [*098B.0020.0002.1D1BA][.0000.0000.0000.1D165] # M.S. MINIMA BLACK ENTRIES ); @@ -616,3 +624,8 @@ ok($L3ignorable->eq("\x{09C7}\x{09BE}A", "\x{09C7}\cA\x{09BE}A")); ok($L3ignorable->eq("\x{09C7}\x{09BE}A", "\x{09C7}\x{0591}\x{09BE}A")); ok($L3ignorable->eq("\x{09C7}\x{09BE}A", "\x{09C7}\x{1D165}\x{09BE}A")); ok($L3ignorable->eq("\x{09C7}\x{09BE}A", "\x{09CB}A")); +ok($L3ignorable->lt("\x{1D1BB}", "\x{1D1BC}")); +ok($L3ignorable->eq("\x{1D1BB}", "\x{1D1B9}")); +ok($L3ignorable->eq("\x{1D1BC}", "\x{1D1BA}")); +ok($L3ignorable->eq("\x{1D1BB}", "\x{1D1B9}\x{1D165}")); +ok($L3ignorable->eq("\x{1D1BC}", "\x{1D1BA}\x{1D165}"));