summaryrefslogtreecommitdiff
path: root/lib/Unicode
diff options
context:
space:
mode:
authorSADAHIRO Tomoyuki <BQW10602@nifty.com>2002-05-05 19:07:57 +0900
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-05 00:13:04 +0000
commit327745dce425cf1e0a6939fc06d5fa7fbfa1fca7 (patch)
treec36bb5eff5a195ecb1efcb1369ed510a86285b79 /lib/Unicode
parent05b46708e81b986c2482c2d8bb843fd924d83d55 (diff)
downloadperl-327745dce425cf1e0a6939fc06d5fa7fbfa1fca7.tar.gz
Re: [Unicode::Collate] UCA Version number
Message-Id: <20020505095942.3BEF.BQW10602@nifty.com> p4raw-id: //depot/perl@16405
Diffstat (limited to 'lib/Unicode')
-rw-r--r--lib/Unicode/Collate.pm21
-rw-r--r--lib/Unicode/Collate/Changes7
-rw-r--r--lib/Unicode/Collate/README2
-rw-r--r--lib/Unicode/Collate/t/test.t1
4 files changed, 17 insertions, 14 deletions
diff --git a/lib/Unicode/Collate.pm b/lib/Unicode/Collate.pm
index e0dfbd39d6..676a3aadfe 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 bb207d86b0..997117c670 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 68f7b80369..4d4f12ce97 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 d6d72884d2..f5a7012ea9 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