New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sprintf() not respecting locale in 5.10+ #11049
Comments
From adiraj@cpan.orgCreated by adiraj@cpan.orgOn both 5.10.1 and 5.12.2: $ perl -MPOSIX -e 'setlocale(LC_ALL, "nl_NL"); print sprintf("%f", interestingly, printf() works fine: $ perl -MPOSIX -e 'setlocale(LC_ALL, "nl_NL"); printf("%f\n", 2.5);' On 5.8.8 everything works: $ perl -MPOSIX -e 'setlocale(LC_ALL, "nl_NL"); print sprintf("%f", Perl Info
|
From adiraj@cpan.orgAny progress on this bug? Has anyone looked at it yet? It seems like an easy fix, so I expected it would be fixed sooner. It |
From [Unknown Contact. See original ticket]Any progress on this bug? Has anyone looked at it yet? It seems like an easy fix, so I expected it would be fixed sooner. It |
adiraj@cpan.org - Status changed from 'new' to 'open' |
From @iabynOn Mon, Oct 03, 2011 at 06:31:04PM -0700, Adi Fairbank via RT wrote:
A git bisect shows the following commit changed the behaviour: commit c427f4d Ensure that constant folding runs with IN_PERL_RUNTIME true, by copying -- |
From @ikegamiOn Thu, Oct 6, 2011 at 3:22 PM, Dave Mitchell <davem@iabyn.com> wrote:
Does the problem only happen in cases of constant folding? If so, it can be sub NO_CONST_FOLD {} |
From @doyIf changes to the runtime environment can cause sprintf to need to |
From @cpansproutOn Mon Jul 02 20:17:15 2012, doy wrote:
I could have sworn this was already fixed (see commit b3fd614), but it -- Father Chrysostomos |
From @cpansproutOn Mon Jul 02 22:41:20 2012, sprout wrote:
Actually, the perllocale page seems to say that setlocale is for $ ./perl -Ilib -MPOSIX -e 'setlocale(LC_ALL, "nl_NL"); print -- Father Chrysostomos |
From @khwilliamsonOn Mon Jul 02 23:14:23 2012, sprout wrote:
You shouldn't expect to get locale effects outside of a 'use locale', So this ticket is the complement of what it should be (in blead anyway). $ blead -MPOSIX -e 'setlocale(LC_NUMERIC, "fr_FR.utf8"); print The printf should not be printing a comma unless "use locale" is -- |
From adiraj@cpan.orgOn Tue Jun 18 15:54:26 2013, khw wrote:
FYI- the above does not work in perl 5.10.1 or 5.12.4: $ /opt/local/bin/perl -v $ perl -v |
From [Unknown Contact. See original ticket]On Tue Jun 18 15:54:26 2013, khw wrote:
FYI- the above does not work in perl 5.10.1 or 5.12.4: $ /opt/local/bin/perl -v $ perl -v |
From @jkeenanOn Thu Jun 20 09:38:41 2013, adi wrote:
What I got with blead: ##### $ ./perl -Ilib -MPOSIX -e 'setlocale(LC_NUMERIC, "fr_FR.utf8");print $ ./perl -Ilib -Mlocale -MPOSIX -e 'setlocale(LC_NUMERIC, |
From adi@adiraj.orgOn Jun 18, 2013, at 3:54 PM, Karl Williamson via RT wrote:
FYI- the above does not work in perl 5.10.1 or 5.12.4: $ /opt/local/bin/perl -v $ perl -v Adi |
From @khwilliamsonThis ticket could be rejected because the behavior it describes is not a bug. Perl is designed to not use locale information except within the scope of 'use locale'. However, an example in the discussion that ensued showed a bug where not being in 'use locale' was not respected, so the bug report has been left open But it turns out that this bug has been fixed by commit e46375f Make printf, sprintf respect 'use locale' for radix Karl Williamson |
@khwilliamson - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#82418 (status was 'resolved')
Searchable as RT82418$
The text was updated successfully, but these errors were encountered: