summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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
5 files changed, 20 insertions, 7 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) {