summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-06-21 21:38:32 -0600
committerKarl Williamson <khw@cpan.org>2015-07-28 22:15:53 -0600
commit9b63e895ee43cb3717f72cde64f6a658b1b46dd7 (patch)
treebf381dfa72b0e8c5bd5c89b393f635405b0189a6 /utf8.c
parentce6e23cf44eba8e2f28aeef6eafc77ef073a33a9 (diff)
downloadperl-9b63e895ee43cb3717f72cde64f6a658b1b46dd7.tar.gz
There are no folds to multiple chars in early Unicode versions
Several places require special handling because of this, notably for the lowercase Sharp S, but not in Unicodes before 3.0.1
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/utf8.c b/utf8.c
index 591174621e..8ea0268af2 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1540,6 +1540,9 @@ Perl__to_fold_latin1(pTHX_ const U8 c, U8* p, STRLEN *lenp, const unsigned int f
if (c == MICRO_SIGN) {
converted = GREEK_SMALL_LETTER_MU;
}
+#if UNICODE_MAJOR_VERSION > 3 /* no multifolds in early Unicode */ \
+ || (UNICODE_MAJOR_VERSION == 3 && ( UNICODE_DOT_VERSION > 0) \
+ || UNICODE_DOT_DOT_VERSION > 0)
else if ((flags & FOLD_FLAGS_FULL) && c == LATIN_SMALL_LETTER_SHARP_S) {
/* If can't cross 127/128 boundary, can't return "ss"; instead return
@@ -1558,6 +1561,7 @@ Perl__to_fold_latin1(pTHX_ const U8 c, U8* p, STRLEN *lenp, const unsigned int f
return 's';
}
}
+#endif
else { /* In this range the fold of all other characters is their lower
case */
converted = toLOWER_LATIN1(c);