summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/CGI/t/html.t2
-rw-r--r--lib/Locale/Codes/t/languages.t2
-rw-r--r--lib/Locale/Language.pm4
-rw-r--r--lib/charnames.t2
-rw-r--r--lib/locale.t17
-rw-r--r--t/lib/locale/latin11
-rw-r--r--t/lib/locale/utf81
-rwxr-xr-xt/op/pat.t2
8 files changed, 23 insertions, 8 deletions
diff --git a/lib/CGI/t/html.t b/lib/CGI/t/html.t
index 93e5dac648..643bbde5a3 100755
--- a/lib/CGI/t/html.t
+++ b/lib/CGI/t/html.t
@@ -15,6 +15,8 @@ use CGI (':standard','-no_debug','*h3','start_table');
$loaded = 1;
print "ok 1\n";
+no utf8; # we contain Latin-1
+
######################### End of black magic.
my $CRLF = "\015\012";
diff --git a/lib/Locale/Codes/t/languages.t b/lib/Locale/Codes/t/languages.t
index 9facd3509d..c643f3a307 100644
--- a/lib/Locale/Codes/t/languages.t
+++ b/lib/Locale/Codes/t/languages.t
@@ -10,7 +10,7 @@ BEGIN {
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.
diff --git a/lib/Locale/Language.pm b/lib/Locale/Language.pm
index 391cffab78..9e0cf19541 100644
--- a/lib/Locale/Language.pm
+++ b/lib/Locale/Language.pm
@@ -247,13 +247,15 @@ modify it under the same terms as Perl itself.
# 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;
diff --git a/lib/charnames.t b/lib/charnames.t
index 124dad0971..cc38221a65 100644
--- a/lib/charnames.t
+++ b/lib/charnames.t
@@ -117,7 +117,7 @@ sub to_bytes {
{
# 20001114.001
- no utf8; # so that the naked 8-bit character won't gripe under use utf8
+ no utf8; # naked Latin-1
if (ord("Ä") == 0xc4) { # Try to do this only on Latin-1.
use charnames ':full';
diff --git a/lib/locale.t b/lib/locale.t
index b18ff41c97..3174fe141a 100644
--- a/lib/locale.t
+++ b/lib/locale.t
@@ -719,19 +719,28 @@ foreach $Locale (@Locale) {
$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) {
diff --git a/t/lib/locale/latin1 b/t/lib/locale/latin1
index f40f7325e0..8499ca46ee 100644
--- a/t/lib/locale/latin1
+++ b/t/lib/locale/latin1
@@ -1,3 +1,4 @@
+no utf8; # naked Latin-1
$locales .= <<EOF;
Català Catalan:ca:es:1 15
Français French:fr:be ca ch fr lu:1 15
diff --git a/t/lib/locale/utf8 b/t/lib/locale/utf8
index fbbe94fb51..69bc505038 100644
--- a/t/lib/locale/utf8
+++ b/t/lib/locale/utf8
@@ -1,3 +1,4 @@
+use utf8;
$locales .= <<EOF;
Català Catalan:ca:es:1 15
Français French:fr:be ca ch fr lu:1 15
diff --git a/t/op/pat.t b/t/op/pat.t
index bed2f376ff..a4cd324c0a 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -237,7 +237,7 @@ print "ok 63\n";
$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;