use Locale::Language;
-no utf8; # so that the naked 8-bit characters won't gripe under use utf8
+no utf8; # we contain Latin-1
#-----------------------------------------------------------------------
# This is an array of tests. Each test is eval'd as an expression.
# initialisation code - stuff the DATA into the CODES hash
#=======================================================================
{
+ no utf8; # __DATA__ contains Latin-1
+
my $code;
my $language;
while (<DATA>)
{
- next unless /\S/;
+ next unless /\S/;
chop;
($code, $language) = split(/:/, $_, 2);
$CODES{$code} = $language;
$utf8skip{117}++;
} else {
use locale;
- use locale;
- no utf8; # so that the native 8-bit characters work
+ no utf8;
my @f = ();
foreach my $x (keys %UPPER) {
my $y = lc $x;
next unless uc $y eq $x;
- push @f, $x unless $x =~ /$y/i && $y =~ /$x/i;
+ print "# UPPER $x lc $y ",
+ $x =~ /$y/i ? 1 : 0, " ",
+ $y =~ /$x/i ? 1 : 0, "\n" if 0;
+ # With utf8 both will fail since the locale concept
+ # of upper/lower does not work well in Unicode.
+ push @f, $x unless $x =~ /$y/i == $y =~ /$x/i;
}
foreach my $x (keys %lower) {
my $y = uc $x;
next unless lc $y eq $x;
- push @f, $x unless $x =~ /$y/i && $y =~ /$x/i;
+ print "# lower $x uc $y ",
+ $x =~ /$y/i ? 1 : 0, " ",
+ $y =~ /$x/i ? 1 : 0, "\n" if 0;
+ # With utf8 both will fail since the locale concept
+ # of upper/lower does not work well in Unicode.
+ push @f, $x unless $x =~ /$y/i == $y =~ /$x/i;
}
tryneoalpha($Locale, 117, @f == 0);
if (@f) {
$out = 1;
'abc' =~ m'a(?{ $out = 3 })c';
print "not " if $out != 1;
-print "ok 64\n";
+print "ok 64\n"; # this fails under use utf8 for no apparent reason --jhi
$_ = 'foobar1 bar2 foobar3 barfoobar5 foobar6';
@out = /(?<!foo)bar./g;