From: SADAHIRO Tomoyuki Date: Sun, 5 May 2002 10:07:57 +0000 (+0900) Subject: Re: [Unicode::Collate] UCA Version number X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=327745dce425cf1e0a6939fc06d5fa7fbfa1fca7;p=p5sagit%2Fp5-mst-13.2.git Re: [Unicode::Collate] UCA Version number Message-Id: <20020505095942.3BEF.BQW10602@nifty.com> p4raw-id: //depot/perl@16405 --- diff --git a/lib/Unicode/Collate.pm b/lib/Unicode/Collate.pm index e0dfbd3..676a3aa 100644 --- a/lib/Unicode/Collate.pm +++ b/lib/Unicode/Collate.pm @@ -13,7 +13,7 @@ use Carp; require Exporter; -our $VERSION = '0.11'; +our $VERSION = '0.12'; our $PACKAGE = __PACKAGE__; our @ISA = qw(Exporter); @@ -27,21 +27,18 @@ our $KeyFile = "allkeys.txt"; our $UNICODE_VERSION; -{ +eval { require Unicode::UCD }; + +unless ($@) { + $UNICODE_VERSION = Unicode::UCD::UnicodeVersion(); +} +else { # XXX, Perl 5.6.1 my($f, $fh); foreach my $d (@INC) { use File::Spec; - $f = File::Spec->catfile($d, "unicore", "version"); - if (open($fh, $f)) { - chomp($UNICODE_VERSION = <$fh>); - close $fh; - last; - } - - # XXX, Perl 5.6.1 $f = File::Spec->catfile($d, "unicode", "Unicode.301"); if (open($fh, $f)) { - $UNICODE_VERSION = "3.0.1"; + $UNICODE_VERSION = '3.0.1'; close $fh; last; } @@ -58,7 +55,7 @@ our $DefaultRearrange = [ 0x0E40..0x0E44, 0x0EC0..0x0EC4 ]; sub UCA_Version { "8.0" } -sub Base_Unicode_Version { $UNICODE_VERSION } +sub Base_Unicode_Version { $UNICODE_VERSION || 'unknown' } ## ## constructor diff --git a/lib/Unicode/Collate/Changes b/lib/Unicode/Collate/Changes index bb207d8..997117c 100644 --- a/lib/Unicode/Collate/Changes +++ b/lib/Unicode/Collate/Changes @@ -1,9 +1,14 @@ Revision history for Perl extension Unicode::Collate. +0.12 Sun May 05 09:43:10 2002 + - add new methods, ->UCA_Version and ->Base_Unicode_Version. + - test fix: removed the needless requirement of Unicode::Normalize. + [reported by David Hand] + 0.11 Fri May 03 02:28:10 2002 - fix: now derived collation elements can be used for Hangul Jamo when their weights are not defined. - [reported by andreas.koenig@anima.de] + [reported by Andreas J. Koenig] - fix: rearrangements had not worked. - mentioned pleblem on index() in BUGS. - more documents, more tests. diff --git a/lib/Unicode/Collate/README b/lib/Unicode/Collate/README index 68f7b80..4d4f12c 100644 --- a/lib/Unicode/Collate/README +++ b/lib/Unicode/Collate/README @@ -1,4 +1,4 @@ -Unicode/Collate version 0.11 +Unicode/Collate version 0.12 =============================== Unicode::Collate - Unicode Collation Algorithm diff --git a/lib/Unicode/Collate/t/test.t b/lib/Unicode/Collate/t/test.t index d6d7288..f5a7012 100644 --- a/lib/Unicode/Collate/t/test.t +++ b/lib/Unicode/Collate/t/test.t @@ -188,6 +188,7 @@ ok($ignoreAE->eq("Perl","ePrl")); my $onlyABC = Unicode::Collate->new( table => undef, + normalization => undef, entry => << 'ENTRIES', 0061 ; [.0101.0020.0002.0061] # LATIN SMALL LETTER A 0041 ; [.0101.0020.0008.0041] # LATIN CAPITAL LETTER A