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
/(^\s]+)/ regexp can incorrectly fail match in utf8 locale #6444
Comments
From bbaetz@acm.orgCreated by bbaetz@acm.orgGiven: use CGI qw(header); With a locale of en_AU.UTF-8, I get: Location="X" With a LANG of en_AU, I get: Location: X The : is correct; the = isn't. This is because inside the |header| sub, there is: # rearrange() was designed for the HTML portion, so we and the first regexp isn't matching when given |location="X"|. In the perl debugger, if I break just inside that loop, I get: DB<1> p $_; DB<3> x $_ =~ /(.*)/; Comparing 6 vs 7, it matches two adjacent nonspace chars, but not one or I failed to come up with a self containted testcase though, or a Perl Info
|
From mark@summersault.comHas there been a status change with this bug since it was reported in I noticed today a comment in the CGI.pm source code... it was avoiding Would you agree that it would be a best practice to avoid using "/s" |
From @demerphqI cannot replicate this bug in blead or in fact in 5.10.1, so I am |
From [Unknown Contact. See original ticket]I cannot replicate this bug in blead or in fact in 5.10.1, so I am |
@demerphq - Status changed from 'new' to 'resolved' |
Migrated from rt.perl.org#21951 (status was 'resolved')
Searchable as RT21951$
The text was updated successfully, but these errors were encountered: