[Bug 835452] New: perl-5.16.0: Broken printing decimal numbers in locales with comma decimal sign

bugzilla at redhat.com bugzilla at redhat.com
Tue Jun 26 08:16:17 UTC 2012


https://bugzilla.redhat.com/show_bug.cgi?id=835452

            Bug ID: 835452
        QA Contact: extras-qa at fedoraproject.org
          Severity: unspecified
               URL: https://rt.perl.org/rt3/Public/Bug/Display.html?id=109
                    318
           Version: rawhide
          Priority: unspecified
                CC: cweyl at alumni.drew.edu, iarnell at gmail.com,
                    jplesnik at redhat.com, kasal at ucw.cz, lkundrak at v3.sk,
                    mmaslano at redhat.com,
                    perl-devel at lists.fedoraproject.org, ppisar at redhat.com,
                    psabata at redhat.com, rc040203 at freenet.de,
                    tcallawa at redhat.com
          Assignee: mmaslano at redhat.com
           Summary: perl-5.16.0: Broken printing decimal numbers in
                    locales with comma decimal sign
        Regression: ---
      Story Points: ---
    Classification: Fedora
                OS: Unspecified
          Reporter: ppisar at redhat.com
              Type: Bug
     Documentation: ---
          Hardware: Unspecified
        Mount Type: ---
            Status: ASSIGNED
         Component: perl
           Product: Fedora

use strict;
use warnings;
use POSIX;
use locale;

setlocale(LC_NUMERIC,"sv_SE");

printf("%g\n","3.14e+9"); # prints "3,14e+09\n"
printf("%g\n","3,14e+9"); # prints "3,14e+09\n"
printf("%g\n","3.14e-9"); # prints "3,14e-09\n"
printf("%g\n","3,14e-9"); # prints "3\n" *** WRONG! ***

Fixed in upstream commit:

commit 78787052b6a68c0f54cfa983a69c44276de9daa4
Author: Jesse Luehrs <doy at tozt.net>
Date:   Tue Jun 26 00:13:54 2012 -0500

    use a less broken test for locale radix in atof [perl #109318]

-- 
You are receiving this mail because:
You are on the CC list for the bug.



More information about the perl-devel mailing list