From be55b2856b90113f440eb7966a4cadedd69ee5e7 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 18 Nov 2017 16:50:48 -0700 Subject: locale.c: Use computed length for U+10FFFF The previous commit calculates this and placed the result in a header file. This now uses the calculated value instead of a hard-coded "4", which is incorrect on EBCDIC platforms. --- locale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale.c b/locale.c index bc507d9031..79ecaa32e7 100644 --- a/locale.c +++ b/locale.c @@ -2939,7 +2939,7 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category) * Unicode code point. Since UTF-8 is the only non-single byte * encoding we handle, we just say any such encoding is UTF-8, and if * turns out to be wrong, other things will fail */ - is_utf8 = MB_CUR_MAX >= 4; + is_utf8 = MB_CUR_MAX >= STRLENs(MAX_UNICODE_UTF8); DEBUG_L(PerlIO_printf(Perl_debug_log, "\tMB_CUR_MAX=%d; ?UTF8 locale=%d\n", -- cgit v1.2.1