-
Notifications
You must be signed in to change notification settings - Fork 559
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
Problem with unicode in Getopt::Long HelpMessage() in perl 5.38 #21841
Comments
This bug is annoying, right |
Downgrading I think this is the same issue: rra/podlators#25 |
Found a simpler workaround than downgrading: add This is because eval {
my @options = (output => 1, details => 1);
my $flag = (PerlIO::get_layers ($$self{output_fh}, @options))[-1];
if ($flag && ($flag & PerlIO::F_UTF8 ())) {
$$self{ENCODE} = 0;
}
}; which throws a quietly discarded exception: |
@xenu Huge thank you for investigating this issue! You are absolutely right — in perl 5.38 there is a change:
(this is the quote from https://perldoc.perl.org/5.38.0/perldelta ) My issue is completly solved, I've updated the base images that I use for 5.38. I'm using images based on 2 official perl docker images, here are the fragments of my
For me the problem is solved, but I'm not sure that I should do with this GitHub issue. Probably I can close it right now, or probably it should be closed only when there are official perl docker images that don't have such problem (it can be achieved by using versions 4.14, or waiting for the new Pod::Man version that fix this issue; quite possible that this will be addressed in rra/podlators#25 ) |
Bisection confirms that this problem entered the Perl 5 core distribution with this commit in December 2022:
However, that commit was quite large, so simply identifying the offending commit does not, in and of itself, identify the problem or the remedy. Further research needed (which will first have to be tested upstream). Note: Perl 5 Porters does not, to my knowledge, maintain any "official Docker images." We only maintain the core distribution, for which we issue monthly developmental releases, an annual production release (around May 20), and maintenance releases as needed. So you'll have to look elsewhere for Docker images. |
They aren't maintained directly by p5p, but docker images are maintained under this organization: https://github.com/Perl/docker-perl |
Is this closable? |
I do not think so: cpan/podlators still contains the issue on blead, ref: perl5/cpan/podlators/lib/Pod/Text.pm Line 365 in 67164c3
It probably should be updated |
The next release of podlators will be a major version bump with quite a lot of changes, and we're outside the merge window for dual-life modules. I think the best strategy for fixing this bug in Perl 5.40, if this is possible (I'm not deeply familiar with the core rules about dual-life Perl modules), would be to cherry-pick rra/podlators@1667094 into core. That's a very small, low-impact change that only fixes this bug, and then the divergence can be dropped after the release freeze when the next major version of podlators is imported. I could also make a patch release if that's necessary, but I will hopefully release podlators v6.0.0 within the next week or two and have so far avoided needing to juggle patch releases. |
IMO this should be cherry-picked, it's a trivial one-line change and it fixes a real issue. However, at this stage I think this needs a PSC decision. I'm marking this as a blocker. |
Cherry-picked from rra/podlators#28 Since it's a cherry-pick, podlators was marked as CUSTOMIZED and its version was bumped. Fixes Perl#21841
PR with a cherry-pick: #22165 |
Cherry-picked from rra/podlators#28 Since it's a cherry-pick, podlators was marked as CUSTOMIZED and its version was bumped. Fixes #21841
Description
We have observed that starting from version 5.38.0, there has been a change in behavior.
We are using official docker images of perl.
Here is the test script, I've saved it in file
not_working.pl
:On docker image perl:5.36.3 (the latest image of 5.36) it is working as expected:
But starting from perl:5.38.0. it does not work. See that instaed of
你好
it output garbage:The problem still persist on perl:5.38.2 (the latest 5.38.*):
Steps to Reproduce
Please see the prvious section for the exact steps.
Expected behavior
I expect that the output of the script running in Perl version 5.38.2 should be identical to that in Perl version 5.36.3. However, the output differs.
Perl configuration
I'm using the official docker image, but here it is:
The text was updated successfully, but these errors were encountered: