diff options
author | Karl Williamson <khw@cpan.org> | 2016-09-28 20:42:30 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-09-29 21:32:18 -0600 |
commit | 7ae54b83ee5a2592c85f68253d73dcfc43161de2 (patch) | |
tree | c1ad45376ad832aaa6044a9d87bf3100ad40b967 /utf8.c | |
parent | 5654fe3cb7747930ab73ec2386527c2d0007459f (diff) | |
download | perl-7ae54b83ee5a2592c85f68253d73dcfc43161de2.tar.gz |
utf8n_to_uvchr() Fix EBCDIC bug with overlongs
The comment removed in this commit was wrong, and so was the code it
described. On EBCDIC platforms, there are malformations that need to be
converted from Unicode to native. When I wrote that I wasn't thinking
about overlongs, which can evaluate to any code point. The new tests in
d566bd20c27a46aecd668d2f739b9515f46ac74f caught this.
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1046,9 +1046,7 @@ Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) } if (sv) { - outlier_ret = uv; /* Note we don't bother to convert to native, - as all the outlier code points are the same - in both ASCII and EBCDIC */ + outlier_ret = UNI_TO_NATIVE(uv); goto do_warn; } |