From 2ac24c837bba9e7d1215d1c4645043d3d0c9894d Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 20 Mar 2021 20:24:20 -0600 Subject: [PATCH] Time-Piece: Use isUPPER, not isupper The latter gives results that are dependent on the program's underlying locale, and so may be inconsistent. If locale dependence is actually desired, isUPPER_LC should be used, as it knows about various things the module writer shouldn't have to concern themselves with. It is supported since 5.004 --- cpan/Time-Piece/Piece.xs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpan/Time-Piece/Piece.xs b/cpan/Time-Piece/Piece.xs index 0e779f539792..23bca50e5b67 100644 --- a/cpan/Time-Piece/Piece.xs +++ b/cpan/Time-Piece/Piece.xs @@ -848,7 +848,7 @@ label: const char *cp; char *zonestr; - for (cp = buf; *cp && isupper((unsigned char)*cp); ++cp) + for (cp = buf; *cp && isUPPER((unsigned char)*cp); ++cp) {/*empty*/} if (cp - buf) { zonestr = (char *)malloc((size_t) (cp - buf + 1));