diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-03 18:27:47 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-03 18:27:47 +0000 |
commit | 4c8433661f9886ea9928ada6c218e87bb90d6b78 (patch) | |
tree | 099719c7d26d21ac57c47faffd0e3bdd5f9b4f88 /lib/Unicode | |
parent | d135e0826fa12e553bd7097ce6e4ef5a65e18767 (diff) | |
download | perl-4c8433661f9886ea9928ada6c218e87bb90d6b78.tar.gz |
Upgrade to Unicode::Collate 0.26.
p4raw-id: //depot/perl@20452
Diffstat (limited to 'lib/Unicode')
-rw-r--r-- | lib/Unicode/Collate.pm | 10 | ||||
-rw-r--r-- | lib/Unicode/Collate/Changes | 5 | ||||
-rw-r--r-- | lib/Unicode/Collate/README | 2 | ||||
-rw-r--r-- | lib/Unicode/Collate/t/index.t | 3 | ||||
-rw-r--r-- | lib/Unicode/Collate/t/test.t | 15 |
5 files changed, 29 insertions, 6 deletions
diff --git a/lib/Unicode/Collate.pm b/lib/Unicode/Collate.pm index 4be5aabd94..fa19afef4f 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 92fdfeb6de..c54933e328 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 8e4a1533ce..7b555fce7a 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 59ad8d7ca8..d6811c7db6 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 9221f5a75f..de4ca59d17 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}")); |