p4raw-id: //depot/perl@19176
my $word = join('', @Neoalpha);
- if ($Locale =~ /utf-?8/i) {
+ my $badutf8;
+ {
+ local $SIG{__WARN__} = sub {
+ $badutf8 = $_[0] =~ /Malformed UTF-8/;
+ };
+ $Locale =~ /utf-?8/i;
+ }
+
+ if ($badutf8) {
+ debug "# Locale name contains bad UTF-8, skipping test 99 for locale '$Locale'\n";
+ } elsif ($Locale =~ /utf-?8/i) {
debug "# unknown whether locale and Unicode have the same \\w, skipping test 99 for locale '$Locale'\n";
push @{$Okay{99}}, $Locale;
} else {