summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-12-16 14:30:36 -0700
committerKarl Williamson <khw@cpan.org>2021-12-28 07:58:11 -0700
commit3c2b2fcba1af380e364ca5be1cd42495caf25e89 (patch)
tree0c0c5e01175c78f8ec62c8fda0e3e87fae3311d5 /utf8.c
parent2c9cc169c7a3a605ffcc50c843807bbb3f7e3a75 (diff)
downloadperl-3c2b2fcba1af380e364ca5be1cd42495caf25e89.tar.gz
Change pack U behavior for EBCDIC
This effectively reverts 3ece276e6c0. It turns out this was a bad idea to make U mean the non-native official Unicode code points. It may seem to make sense to do so, but broke multiple CPAN modules which were using U the previous way. This commit has no effect on ASCII-platform functioning.
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utf8.c b/utf8.c
index 3c73714062..afd05065c1 100644
--- a/utf8.c
+++ b/utf8.c
@@ -2659,7 +2659,7 @@ Perl_utf16_to_utf8_base(pTHX_ U8* p, U8* d, Size_t bytelen, Size_t *newlen,
}
/* Here, 'uv' is the real U32 we want to find the UTF-8 of */
- d = uvoffuni_to_utf8_flags(d, uv, 0);
+ d = uvchr_to_utf8(d, uv);
}
*newlen = d - dstart;
@@ -2712,9 +2712,9 @@ Perl_utf8_to_utf16_base(pTHX_ U8* s, U8* d, Size_t bytelen, Size_t *newlen,
while (s < send) {
STRLEN retlen;
- UV uv = NATIVE_TO_UNI(utf8n_to_uvchr(s, send - s, &retlen,
+ UV uv = utf8n_to_uvchr(s, send - s, &retlen,
/* No surrogates nor above-Unicode */
- UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE));
+ UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE);
/* The modern method is to keep going with malformed input,
* substituting the REPLACEMENT CHARACTER */