This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/loc_tools.pl: 8859-16 is legit; 8859-0 isn't
authorKarl Williamson <khw@cpan.org>
Fri, 23 Feb 2018 18:02:40 +0000 (11:02 -0700)
committerKarl Williamson <khw@cpan.org>
Sun, 25 Feb 2018 05:08:41 +0000 (22:08 -0700)
This adjusts the loop boundaries looking for come common locale names.
It was failing to look for 8859-16; instead looking for latin0, 8859-0,
which don't exist

t/loc_tools.pl

index 49bcc70..db0bfac 100644 (file)
@@ -307,7 +307,7 @@ sub find_locales ($;$) {
     my @Locale;
     _trylocale("C", $categories, \@Locale, $allow_incompatible);
     _trylocale("POSIX", $categories, \@Locale, $allow_incompatible);
-    foreach (0..15) {
+    foreach (1..16) {
         _trylocale("ISO8859-$_", $categories, \@Locale, $allow_incompatible);
         _trylocale("iso8859$_", $categories, \@Locale, $allow_incompatible);
         _trylocale("iso8859-$_", $categories, \@Locale, $allow_incompatible);