(The fix did work but was not right, retracted in #6573)
authorChristian Kirsch <ck@held.mind.de>
Wed, 9 Aug 2000 17:05:17 +0000 (19:05 +0200)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 9 Aug 2000 20:41:18 +0000 (20:41 +0000)
Subject: [ID 20000809.003] setlocale(LC_NUMERIC...) produces different results in 5.005 and 5.6
Message-Id: <20000809170517.A25389@held>

p4raw-id: //depot/perl@6559

sv.c
t/pragma/locale.t

diff --git a/sv.c b/sv.c
index 382805f..92c53ee 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -6563,12 +6563,8 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
                *--eptr = '#';
            *--eptr = '%';
 
-           {
-               RESTORE_NUMERIC_STANDARD();
-               (void)sprintf(PL_efloatbuf, eptr, nv);
-               RESTORE_NUMERIC_LOCAL();
-           }
-
+           (void)sprintf(PL_efloatbuf, eptr, nv);
+       
            eptr = PL_efloatbuf;
            elen = strlen(PL_efloatbuf);
            break;
index 414ceff..5f60115 100755 (executable)
@@ -664,6 +664,7 @@ foreach $Locale (@Locale) {
        print "# testing 116 failed for locale '$Locale' for characters @f\n"
             if @f;
     }
+
 }
 
 # Recount the errors.
@@ -709,26 +710,30 @@ EOW
     }
 }
 
-# Tell which locales ere okay.
+# Tell which locales were okay.
 
 if ($didwarn) {
     my @s;
     
     foreach my $l (@Locale) {
        my $p = 0;
-       foreach my $t (102..102) {
+       foreach my $t (102..116) {
            $p++ if $Problem{$t}{$l};
        }
        push @s, $l if $p == 0;
     }
     
-    my $s = join(" ", @s);
-    $s =~ s/(.{50,60}) /$1\n#\t/g;
-
-    warn
-       "# The following locales\n#\n",
-        "#\t", $s, "\n#\n",
-       "# tested okay.\n#\n",
+    if (@s) {
+        my $s = join(" ", @s);
+        $s =~ s/(.{50,60}) /$1\n#\t/g;
+
+        warn
+           "# The following locales\n#\n",
+            "#\t", $s, "\n#\n",
+           "# tested okay.\n#\n",
+    } else {
+        warn "# None of your locales was fully okay.\n";
+    }
 }
 
 # eof