is(($str =~ /(\p{sc:InGreek}+)/)[0], "\x{038B}\x{038C}\x{038D}");
is(($str =~ /(\p{sc=InGreek}+)/)[0], "\x{038B}\x{038C}\x{038D}");
-
use File::Spec;
my $updir = File::Spec->updir;
-
# the %utf8::... hashes are already in existence
# because utf8_pva.pl was run by utf8_heavy.pl
+*utf8::PropertyAlias = *utf8::PropertyAlias; # thwart a warning
+
+no warnings 'utf8'; # we do not want warnings about surrogates etc
+
# non-General Category and non-Script
while (my ($abbrev, $files) = each %utf8::PVA_abbr_map) {
my $prop_name = $utf8::PropertyAlias{$abbrev};
);
next unless -e $filename;
- my ($h1, $h2) = map hex, split /\t/, (do $filename);
+ my ($h1, $h2) = map hex, (split(/\t/, (do $filename), 3))[0,1];
my $str = join "", map chr, $h1 .. (($h2 || $h1) + 1);
for my $p ($prop_name, $abbrev) {
);
next unless -e $filename;
- my ($h1, $h2) = map hex, split /\t/, (do $filename);
+ my ($h1, $h2) = map hex, (split(/\t/, (do $filename), 3))[0,1];
my $str = join "", map chr, $h1 .. (($h2 || $h1) + 1);
for my $x ($p, { gc => 'General Category', sc => 'Script' }->{$p}) {
my $dirname = File::Spec->catdir($updir => lib => unicore => lib => gc_sc);
opendir D, $dirname or die $!;
- @files{readdir D} = ();
+ @files{readdir(D)} = ();
closedir D;
for (keys %utf8::PA_reverse) {
my $filename = File::Spec->catfile($dirname, $leafname);
- my ($h1, $h2) = map hex, split /\t/, (do $filename);
+ my ($h1, $h2) = map hex, (split(/\t/, (do $filename), 3))[0,1];
my $str = join "", map chr, $h1 .. (($h2 || $h1) + 1);
for my $x ('gc', 'General Category') {
);
next unless -e $filename;
- my ($h1, $h2) = map hex, split /\t/, (do $filename);
+ my ($h1, $h2) = map hex, (split(/\t/, (do $filename), 3))[0,1];
my $str = join "", map chr, $h1 .. (($h2 || $h1) + 1);
my $blk = $_;