summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-11-18 16:50:48 -0700
committerKarl Williamson <khw@cpan.org>2017-11-18 19:49:47 -0700
commitbe55b2856b90113f440eb7966a4cadedd69ee5e7 (patch)
tree3b14781a00372399de224483e490c3061357e728
parent566efd885319cacbde16a751c5a0754dcc8eca08 (diff)
downloadperl-be55b2856b90113f440eb7966a4cadedd69ee5e7.tar.gz
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.
-rw-r--r--locale.c2
1 files changed, 1 insertions, 1 deletions
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",