},
'Unicode::Collate' => {
- 'DISTRIBUTION' => 'SADAHIRO/Unicode-Collate-1.01.tar.gz',
+ 'DISTRIBUTION' => 'SADAHIRO/Unicode-Collate-1.02.tar.gz',
'FILES' => q[cpan/Unicode-Collate],
'EXCLUDED' => [
qr{N$},
no warnings 'utf8';
-our $VERSION = '1.01';
+our $VERSION = '1.02';
our $PACKAGE = __PACKAGE__;
### begin XS only ###
returns C<-1> in scalar context and
an empty list in list context.
-e.g. you say
+e.g. when the content of C<$str> is C<"Ich mu>E<szlig>C< studieren Perl.">,
+you say the following where C<$sub> is C<"M>E<uuml>C<SS">,
my $Collator = Unicode::Collate->new( normalization => undef, level => 1 );
# (normalization => undef) is REQUIRED.
- my $str = "Ich muß studieren Perl.";
- my $sub = "MÜSS";
my $match;
if (my($pos,$len) = $Collator->index($str, $sub)) {
$match = substr($str, $pos, $len);
}
-and get C<"muß"> in C<$match> since C<"muß">
-is primary equal to C<"MÜSS">.
+and get C<"mu>E<szlig>C<"> in C<$match>, since C<"mu>E<szlig>C<">
+is primary equal to C<"M>E<uuml>C<SS">.
=item C<$match_ref = $Collator-E<gt>match($string, $substring)>
modify it under the same terms as Perl itself.
The file Unicode/Collate/allkeys.txt was copied verbatim
-from L<http://www.unicode.org/Public/UCA/6.2.0/allkeys.txt>.
+from L<http://www.unicode.org/Public/UCA/6.3.0/allkeys.txt>.
For this file, Copyright (c) 2001-2012 Unicode, Inc.
Distributed under the Terms of Use in L<http://www.unicode.org/copyright.html>.
use strict;
use Unicode::Collate;
-our $VERSION = '0.93';
+our $VERSION = '1.02';
my %jamo2prim = (
0x1100, 0x3152, 0x1101, 0x3153, 0x1102, 0x3154, 0x1103, 0x3155,
use Carp;
use base qw(Unicode::Collate);
-our $VERSION = '1.01';
+our $VERSION = '1.02';
my $PL_EXT = '.pl';
use strict;
use warnings;
-BEGIN { $| = 1; print "1..421\n"; } # 1 + 42 x @Versions
+BEGIN { $| = 1; print "1..463\n"; } # 1 + 42 x @Versions
my $count = 0;
sub ok ($;$) {
my $p = my $r = shift;
# 2A700..2B734 are CJK UI Ext.C since UCA_Version 20 (Unicode 5.2).
# 2B740..2B81D are CJK UI Ext.D since UCA_Version 22 (Unicode 6.0).
-my @Versions = (8, 9, 11, 14, 16, 18, 20, 22, 24, 26);
+my @Versions = (8, 9, 11, 14, 16, 18, 20, 22, 24, 26, 28);
for my $v (@Versions) {
$coll->change(UCA_Version => $v);
use strict;
use warnings;
-BEGIN { $| = 1; print "1..701\n"; } # 1 + 70 x @Versions
+BEGIN { $| = 1; print "1..771\n"; } # 1 + 70 x @Versions
my $count = 0;
sub ok ($;$) {
my $p = my $r = shift;
#########################
-my @Versions = (8, 9, 11, 14, 16, 18, 20, 22, 24, 26);
+my @Versions = (8, 9, 11, 14, 16, 18, 20, 22, 24, 26, 28);
# 12 compatibility ideographs are treated as unified ideographs:
# FA0E, FA0F, FA11, FA13, FA14, FA1F, FA21, FA23, FA24, FA27, FA28, FA29.
use strict;
use warnings;
-BEGIN { $| = 1; print "1..501\n"; } # 1 + 50 x @Versions
+BEGIN { $| = 1; print "1..551\n"; } # 1 + 50 x @Versions
my $count = 0;
sub ok ($;$) {
my $p = my $r = shift;
#########################
-my @Versions = (8, 9, 11, 14, 16, 18, 20, 22, 24, 26);
+my @Versions = (8, 9, 11, 14, 16, 18, 20, 22, 24, 26, 28);
for my $v (@Versions) {
ok(Unicode::Collate::getHST(0x0000, $v), '');
use strict;
use warnings;
-BEGIN { $| = 1; print "1..131\n"; } # 81 + 5 x @Versions
+BEGIN { $| = 1; print "1..136\n"; } # 81 + 5 x @Versions
my $count = 0;
sub ok ($;$) {
my $p = my $r = shift;
overrideOut => sub { 0xFFFD },
);
-my @Versions = (8, 9, 11, 14, 16, 18, 20, 22, 24, 26);
+my @Versions = (8, 9, 11, 14, 16, 18, 20, 22, 24, 26, 28);
for my $v (@Versions) {
$out->change(UCA_Version => $v);
use strict;
use warnings;
-BEGIN { $| = 1; print "1..497\n"; }
+BEGIN { $| = 1; print "1..528\n"; }
my $count = 0;
sub ok ($;$) {
my $p = my $r = shift;
# 382
+ok($objJa->eq("\x{30AC}", "\x{30AB}\x{3099}"));
+ok($objJa->eq("\x{30AE}", "\x{30AD}\x{3099}"));
+ok($objJa->eq("\x{30B0}", "\x{30AF}\x{3099}"));
+ok($objJa->eq("\x{30B2}", "\x{30B1}\x{3099}"));
+ok($objJa->eq("\x{30B4}", "\x{30B3}\x{3099}"));
+ok($objJa->eq("\x{30B6}", "\x{30B5}\x{3099}"));
+ok($objJa->eq("\x{30B8}", "\x{30B7}\x{3099}"));
+ok($objJa->eq("\x{30BA}", "\x{30B9}\x{3099}"));
+ok($objJa->eq("\x{30BC}", "\x{30BB}\x{3099}"));
+ok($objJa->eq("\x{30BE}", "\x{30BD}\x{3099}"));
+ok($objJa->eq("\x{30C0}", "\x{30BF}\x{3099}"));
+ok($objJa->eq("\x{30C2}", "\x{30C1}\x{3099}"));
+ok($objJa->eq("\x{30C5}", "\x{30C4}\x{3099}"));
+ok($objJa->eq("\x{30C7}", "\x{30C6}\x{3099}"));
+ok($objJa->eq("\x{30C9}", "\x{30C8}\x{3099}"));
+ok($objJa->eq("\x{30D0}", "\x{30CF}\x{3099}"));
+ok($objJa->eq("\x{30D1}", "\x{30CF}\x{309A}"));
+ok($objJa->eq("\x{30D3}", "\x{30D2}\x{3099}"));
+ok($objJa->eq("\x{30D4}", "\x{30D2}\x{309A}"));
+ok($objJa->eq("\x{30D6}", "\x{30D5}\x{3099}"));
+ok($objJa->eq("\x{30D7}", "\x{30D5}\x{309A}"));
+ok($objJa->eq("\x{30D9}", "\x{30D8}\x{3099}"));
+ok($objJa->eq("\x{30DA}", "\x{30D8}\x{309A}"));
+ok($objJa->eq("\x{30DC}", "\x{30DB}\x{3099}"));
+ok($objJa->eq("\x{30DD}", "\x{30DB}\x{309A}"));
+ok($objJa->eq("\x{30F4}", "\x{30A6}\x{3099}"));
+ok($objJa->eq("\x{30F7}", "\x{30EF}\x{3099}"));
+ok($objJa->eq("\x{30F8}", "\x{30F0}\x{3099}"));
+ok($objJa->eq("\x{30F9}", "\x{30F1}\x{3099}"));
+ok($objJa->eq("\x{30FA}", "\x{30F2}\x{3099}"));
+ok($objJa->eq("\x{30FE}", "\x{30FD}\x{3099}"));
+
+# 413
+
ok($objJa->eq("\x{304C}", "\x{304B}\x{3099}"));
ok($objJa->eq("\x{304E}", "\x{304D}\x{3099}"));
ok($objJa->eq("\x{3050}", "\x{304F}\x{3099}"));
ok($objJa->eq("\x{3094}", "\x{3046}\x{3099}"));
ok($objJa->eq("\x{309E}", "\x{309D}\x{3099}"));
-# 409
+# 440
$objJa->change(katakana_before_hiragana => 1);
ok($objJa->lt("\x{309D}", "\x{30FD}"));
ok($objJa->lt("\x{309E}", "\x{30FE}"));
-# 497
+# 528
#########################
-my $Kssa = "\x{B95}\x{BCD}\x{BB7}";
-my $v = "\x{BCD}";
-
my $objTa = Unicode::Collate::Locale->
new(locale => 'TA', normalization => undef);
$objTa->change(level => 1);
+my $Kssa = "\x{B95}\x{BCD}\x{BB7}";
+my $v = "\x{BCD}";
+
for my $h (0, 1) {
no warnings 'utf8';
my $t = $h ? pack('U', 0xFFFF) : "";
ok($objTa->lt("${Kssa}$v$t", "${Kssa}"));
ok($objTa->lt("${Kssa}$t", "\x{BBE}"));
}
+
+# 104
use strict;
use warnings;
-BEGIN { $| = 1; print "1..316\n"; } # 6 + 31 x @Versions
+BEGIN { $| = 1; print "1..347\n"; } # 6 + 31 x @Versions
my $count = 0;
sub ok ($;$) {
my $p = my $r = shift;
# 2A700..2B734 are CJK UI Ext.C since UCA_Version 20 (Unicode 5.2).
# 2B740..2B81D are CJK UI Ext.D since UCA_Version 22 (Unicode 6.0).
-my @Versions = (8, 9, 11, 14, 16, 18, 20, 22, 24, 26);
+my @Versions = (8, 9, 11, 14, 16, 18, 20, 22, 24, 26, 28);
for my $v (@Versions) {
$ignoreCJK->change(UCA_Version => $v);
use strict;
use warnings;
-BEGIN { $| = 1; print "1..171\n"; } # 11 + 16 x @Versions
+BEGIN { $| = 1; print "1..187\n"; } # 11 + 16 x @Versions
my $count = 0;
sub ok ($;$) {
my $p = my $r = shift;
# 9FC4..9FCB are CJK UI since UCA_Version 20 (Unicode 5.2).
# 9FCC is CJK UI since UCA_Version 24 (Unicode 6.1).
-my @Versions = (8, 9, 11, 14, 16, 18, 20, 22, 24, 26);
+my @Versions = (8, 9, 11, 14, 16, 18, 20, 22, 24, 26, 28);
for my $v (@Versions) {
$overCJK->change(UCA_Version => $v);
use strict;
use warnings;
-BEGIN { $| = 1; print "1..89\n"; }
+BEGIN { $| = 1; print "1..93\n"; } # 53 + 4 x @Versions
my $count = 0;
sub ok ($;$) {
my $p = my $r = shift;
##### 53
-my @Versions = (9, 11, 14, 16, 18, 20, 22, 24, 26);
+my @Versions = (9, 11, 14, 16, 18, 20, 22, 24, 26, 28);
for my $v (@Versions) {
$Collator->change(UCA_Version => $v);
'[0A0C 0A0D | 0020 0020 | 0002 0002 |]');
}
-##### 89
-