Bug 835452 - perl-5.16.0: Broken printing decimal numbers in locales with comma decimal sign
perl-5.16.0: Broken printing decimal numbers in locales with comma decimal sign
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: perl (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jitka Plesnikova
Fedora Extras Quality Assurance
https://rt.perl.org/rt3/Public/Bug/Di...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-26 04:16 EDT by Petr Pisar
Modified: 2012-07-03 06:07 EDT (History)
11 users (show)

See Also:
Fixed In Version: perl-5.16.0-225.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-03 06:07:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Pisar 2012-06-26 04:16:17 EDT
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@tozt.net>
Date:   Tue Jun 26 00:13:54 2012 -0500

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

Note You need to log in before you can comment on or make changes to this bug.