Bug 970913 - perl-5.18: UTF-8-downgraded variables are not properly interpolated in a regular expression
perl-5.18: UTF-8-downgraded variables are not properly interpolated in a regu...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: perl (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jitka Plesnikova
Fedora Extras Quality Assurance
https://rt.perl.org/rt3//Public/Bug/D...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-05 04:15 EDT by Petr Pisar
Modified: 2013-08-14 04:28 EDT (History)
11 users (show)

See Also:
Fixed In Version: perl-5.18.1-287.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-14 04:28:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Pisar 2013-06-05 04:15:31 EDT
$ perl -e 'utf8::upgrade(my $u = "\x{e5}"); utf8::downgrade(my $d =
"\x{e5}"); qr{$u $d}'
Malformed UTF-8 character (1 byte, need 3, after start byte 0xe5) in
regexp compilation at -e line 1.
Malformed UTF-8 character (1 byte, need 3, after start byte 0xe5) in
regexp compilation at -e line 1.

This bug has been reported to upstream <https://rt.perl.org/rt3//Public/Bug/Display.html?id=118297> and fixed with upstream commit:

commit b8372399b387c0e276aee3d41b3c7833dd08087b
Author: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Date:   Tue Jun 4 18:15:24 2013 +0100

    [perl #118297] Fix interpolating downgraded variables into upgraded regexp
    
    The code alredy upgraded the pattern if interpolating an upgraded
    string into it, but not vice versa.  Just use sv_catsv_nomg() instead
    of sv_catpvn_nomg(), so that it can upgrade as necessary.
Comment 1 Fedora Admin XMLRPC Client 2013-08-12 07:43:38 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Note You need to log in before you can comment on or make changes to this bug.