require Exporter;
-our $VERSION = '0.11';
+our $VERSION = '0.12';
our $PACKAGE = __PACKAGE__;
our @ISA = qw(Exporter);
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;
}
sub UCA_Version { "8.0" }
-sub Base_Unicode_Version { $UNICODE_VERSION }
+sub Base_Unicode_Version { $UNICODE_VERSION || 'unknown' }
##
## constructor
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.
-Unicode/Collate version 0.11
+Unicode/Collate version 0.12
===============================
Unicode::Collate - Unicode Collation Algorithm
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