diff options
author | Karl Williamson <khw@cpan.org> | 2017-07-28 08:26:35 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2017-07-28 08:26:45 +0100 |
commit | 7e4f1950d493828a9ccdb25842eeed1823e71df8 (patch) | |
tree | 2f6b61084c802aa10ac9a4c48db231465a546cad /toke.c | |
parent | c00934b73e0572477646e79eb4ff017452ae9d8e (diff) | |
download | perl-7e4f1950d493828a9ccdb25842eeed1823e71df8.tar.gz |
PATCH: [perl #128734] tr/\N{...}/ failing for 128-255
The upper latin1 characters when expressed as \N{U+...} were failing.
This was due to trying to convert them to UTF-8 when the result isn't
UTF-8. I added a test for \N{name} as well, though these were not
affected by this regression.
(cherry picked from commit 3a34ca0bce7835211b45e070373cf653c253636a)
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3540,7 +3540,7 @@ S_scan_const(pTHX_ char *start) } /* Add the (Unicode) code point to the output. */ - if (OFFUNI_IS_INVARIANT(uv)) { + if (! has_utf8 || OFFUNI_IS_INVARIANT(uv)) { *d++ = (char) LATIN1_TO_NATIVE(uv); } else { |