From 3c2b2fcba1af380e364ca5be1cd42495caf25e89 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Thu, 16 Dec 2021 14:30:36 -0700 Subject: 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. --- utf8.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'utf8.c') 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 */ -- cgit v1.2.1