develooper Front page | perl.perl5.porters | Postings from March 2019

[perl #133945] ce6f496d720f6206455628425320badd95b07372 breaks floatformatting under GTK

Thread Previous | Thread Next
James E Keenan via RT
March 21, 2019 13:28
[perl #133945] ce6f496d720f6206455628425320badd95b07372 breaks floatformatting under GTK
Message ID:
On Wed, 20 Mar 2019 18:03:23 GMT, int32 wrote:
> This is a bug report for perl from,
> generated with the help of perlbug 1.41 running under perl 5.29.2.
> -----------------------------------------------------------------
> [Please describe your issue here]
> ce6f496d720f6206455628425320badd95b07372 changed float/double
> formatting
> from strtoflt128 to Perl_strtod, which had a nasty side effect when
> running
> under non-english locales (or I suspect with locales that use comma
> for decimal point)
> together with GTK or any other library that calls setlocale() itself.
> The test for this is rather elaborate, so I'm attaching a localebug
> module
> that tests for it when run 'make test'. One needs the following (for
> Ubuntu, for
> example):
> * apt-get install libgtk2.0-dev (gtk development files)
> * cpan ExtUtils::PkgConfig
> * locale-gen de_DE.UTF-8 && update-locale (tests need de_DE.UTF-8)
> When running with a faulty configuration, the core issue is basically
> this:
> my $s = sprintf "%s", 4.9999;
> die "bug:$s" if $s !~ /^4[,.]9999$/;
> which prints just "4".
> The module attached can also be found at

In order to run the tests in your tarball, I would have to become the root user (or sudo) and change the default locale.  I am reluctant to do that and, in any case, we have to be able to run the Perl 5 core test suite as non-root users.

Could your tests be modified so that an ordinary user could run them?

Thank you very much.

James E Keenan (

via perlbug:  queue: perl5 status: open

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About