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
setlocale's return value is broken #16435
Comments
From @eserteThis is a bug report for perl from slaven@rezic.de, On Linux systems (checked CentOS6 and various Debians) the $ env LC_ALL=de_DE.UTF-8 perl5.27.9 -MPOSIX=setlocale,LC_ALL -e 'warn setlocale(LC_ALL)' This does not seem to happen if the current locale is C. And I cannot The problem does not happen with 5.27.8-157-gef80cd9 or earlier perl (Discovered because the test suite of MSCHOUT/Math-Currency-0.52.tar.gz Flags: Site configuration information for perl 5.27.9: Configured by eserte at Tue Feb 20 21:59:42 CET 2018. Summary of my perl5 (revision 5 version 27 subversion 9) configuration: @INC for perl 5.27.9: Environment for perl 5.27.9: |
From @khwilliamsonOn 02/23/2018 12:33 AM, slaven@rezic.de wrote:
I don't get garbage, but I'm not getting the shortest output possible on Please run the following on a DEBUGGING build, and post the output. env LC_ALL=de_DE.UTF-8 env PERL_DEBUG_LOCALE_INIT=1 perl5.27.9 -DLv (I don't know the proper syntax of stringing two env's together, so
|
The RT System itself - Status changed from 'new' to 'open' |
From @eserteKarl Williamson <public@khwilliamson.com> writes:
Attached. This is with a slightly newer perl than 5.27.9 (d3a1131). Regards,
|
From @eserte-- Berlin Perl Mongers - http://berlin.pm.org |
From @khwilliamsonOn 02/23/2018 02:41 PM, Slaven Rezic wrote:
Unfortunately the logging option you selected was lowercase 'l' instead
|
From @eserteKarl Williamson <public@khwilliamson.com> writes:
2nd try, using the smoke-me/khw-locale branch and running env LC_ALL=de_DE.UTF-8 PERL_DEBUG_LOCALE_INIT=1 LD_LIBRARY_PATH=$(pwd) ./perl -Ilib -DLv -MPOSIX=setlocale,LC_ALL -e 'warn setlocale(LC_ALL)' >& /tmp/132901-khw-locale.log Log attached.
|
From @eserte-- Berlin Perl Mongers - http://berlin.pm.org |
From @khwilliamsonOn 02/24/2018 02:00 AM, Slaven Rezic wrote:
Please send me config.h for this system
|
From @khwilliamsonOn 02/24/2018 01:14 PM, Karl Williamson wrote:
I believe this is fixed in blead; please verify. |
From @eserte"karl williamson via RT" <perlbug-followup@perl.org> writes:
No, it's still not fixed: $ env LC_ALL=de_DE.UTF-8 ./perl -Ilib -MTest::More=no_plan -MPOSIX=setlocale,LC_ALL -e 'is setlocale(LC_ALL), "de_DE.UTF-8"' $ env LC_ALL=de_DE.UTF-8 ./perl -Ilib -V|grep Commit.id -- |
From @khwilliamsonOn 02/25/2018 03:03 AM, Slaven Rezic wrote:
Sorry, somehow not all the commits I intended to push actually got And, yes, I will add a test |
From @eserteKarl Williamson <public@khwilliamson.com> writes:
It's still not pushed: $ git fetch && git checkout 7a60910d1bd9081951d3509805c035b0c4bcbe79
-- Berlin Perl Mongers - http://berlin.pm.org |
From @khwilliamsonOn 02/25/2018 09:26 AM, Slaven Rezic wrote:
Embarrassingly, I guess the push failed, and I didn't look carefully.
|
From @eserte"karl williamson via RT" <perlbug-followup@perl.org> writes:
Yes, the commit is there, and the oneliner above passes now. Thanks & regards, -- Berlin Perl Mongers - http://berlin.pm.org |
From @khwilliamsonOn 02/25/2018 10:21 AM, Slaven Rezic wrote:
I realize now in looking at the tests why there is not already a test That said, I know of no system that actually doesn't return a human I suppose a test could be written which strips off the hyphens and I'm open to hearing ideas. |
From @cpansproutOn Sun, 25 Feb 2018 11:47:40 -0800, public@khwilliamson.com wrote:
Tests that need constant tweaking are the maintainer’s bane. Could we do some kind of ‘loose match’ that requires at least, say, four or five of the same ASCII alphanumerical characters to be present in both strings, and in the right order? If you transform de_DE.UTF-8 to /d.*e.*d.*e.*/aai this might actually work and require little tweaking in the long term. It would certainly have caught the bug. This would work: $regexp = substr fc( -- Father Chrysostomos |
From @khwilliamsonOP confirms that is fixed by 33e5a35 |
@khwilliamson - Status changed from 'open' to 'resolved' |
From zefram@fysh.orgKarl Williamson wrote:
That's obviously the correct way to test it: feed the value to setlocale() -zefram |
Migrated from rt.perl.org#132901 (status was 'resolved')
Searchable as RT132901$
The text was updated successfully, but these errors were encountered: