From 4d7db1b9da573ce828cd700a0f88a8e5cf401038 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 29 Jan 2014 03:04:24 +0100 Subject: [PATCH] PATCH: [perl #121109] locales failing This was due to a logic error in toFOLD_LC() introduced in 31f05a37c4e9c37a7263491f2fc0237d836e1a80. It affected only the code point at 0xB5 and shows up only in locales in which the character at that code point is an uppercase letter. --- handy.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/handy.h b/handy.h index c65170a..0a504bf 100644 --- a/handy.h +++ b/handy.h @@ -1310,13 +1310,11 @@ EXTCONST U32 PL_charclass[]; * values "ss"); instead it asserts against that under DEBUGGING, and * otherwise returns its input */ #define _generic_toFOLD_LC(c, function, cast) \ - (LIKELY((c) != MICRO_SIGN) \ - ? (__ASSERT_(! IN_UTF8_CTYPE_LOCALE \ - || (c) != LATIN_SMALL_LETTER_SHARP_S) \ - _generic_toLOWER_LC(c, function, cast)) \ - : (IN_UTF8_CTYPE_LOCALE) \ + ((UNLIKELY((c) == MICRO_SIGN) && IN_UTF8_CTYPE_LOCALE) \ ? GREEK_SMALL_LETTER_MU \ - : (c)) + : (__ASSERT_(! IN_UTF8_CTYPE_LOCALE \ + || (c) != LATIN_SMALL_LETTER_SHARP_S) \ + _generic_toLOWER_LC(c, function, cast))) /* Use the libc versions for these if available. */ #if defined(HAS_ISASCII) && ! defined(USE_NEXT_CTYPE) -- 2.7.4