Skip to content

Commit a4f7ef2

Browse files
committed
locale.c: Add debug for MB_CUR_MAX
The latest MacOS release has locales that set this wrongly. This isn't the first time this has been a problem. Add a debugging line that can easily be enabled to check for problems that may arise in the field.
1 parent 5b9aabc commit a4f7ef2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

locale.c

+3
Original file line numberDiff line numberDiff line change
@@ -3851,6 +3851,9 @@ S_new_ctype(pTHX_ const char *newctype, bool force)
38513851

38523852
const int mb_cur_max = MB_CUR_MAX;
38533853

3854+
DEBUG_Lv(PerlIO_printf(Perl_debug_log, "MB_CUR_MAX=%d, utf8?=%d\n",
3855+
mb_cur_max, PL_in_utf8_CTYPE_locale));
3856+
38543857
if (mb_cur_max > 1 && ! PL_in_utf8_CTYPE_locale
38553858

38563859
/* Some platforms return MB_CUR_MAX > 1 for even the "C" locale.

0 commit comments

Comments
 (0)