unless $category =~ / ^ -? \d+ $ /x;
return unless setlocale($category, $locale);
- return if ! $plays_well && ! $allow_incompatible;
+ last if $badutf8 || ! $plays_well;
}
if ($badutf8) {
ok(0, "Verify locale name doesn't contain malformed utf8");
return;
}
- push @$list, $locale;
+ push @$list, $locale if $plays_well || $allow_incompatible;
}
sub _decode_encodings { # For use only by other functions in this file!
# Locales whose name differs if the utf8 bit is on are stored in these two
# files with appropriate encodings.
if ($^H & 0x08 || (${^OPEN} || "") =~ /:utf8/) {
- @Data = do "lib/locale/utf8";
+ @Data = do "./lib/locale/utf8";
} else {
- @Data = do "lib/locale/latin1";
+ @Data = do "./lib/locale/latin1";
}
# The rest of the locales are in this file.