summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-01-12 20:05:29 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-12 20:05:29 +0000
commitcab783d47ea9757fb3e24f396274078bf6709973 (patch)
treefc5b70022b30a53e73a84e5eedceb80c6d5f784a /utf8.h
parent32bb83be6f155aa674afe1f2fbf9a348a37c7557 (diff)
downloadperl-cab783d47ea9757fb3e24f396274078bf6709973.tar.gz
Sharp S as a special treat for our German UTF-8 testers :-)
p4raw-id: //depot/perl@14222
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/utf8.h b/utf8.h
index 8c27afab50..2ac5f91c2c 100644
--- a/utf8.h
+++ b/utf8.h
@@ -189,6 +189,7 @@ END_EXTERN_C
#define UTF8_IS_ASCII(c) UTF8_IS_INVARIANT(c)
+#define UNICODE_LATIN_SMALL_LETTER_SHARP_S 0x00DF
#define UNICODE_GREEK_CAPITAL_LETTER_SIGMA 0x03A3
#define UNICODE_GREEK_SMALL_LETTER_FINAL_SIGMA 0x03C2
#define UNICODE_GREEK_SMALL_LETTER_SIGMA 0x03C3
@@ -198,3 +199,10 @@ END_EXTERN_C
#define UNI_DISPLAY_QQ (UNI_DISPLAY_ISPRINT|UNI_DISPLAY_BACKSLASH)
#define UNI_DISPLAY_REGEX (UNI_DISPLAY_ISPRINT|UNI_DISPLAY_BACKSLASH)
+#define ANYOF_UNICODE_FOLD_SHARP_S(n, s, e) \
+ (ANYOF_BITMAP_TEST(n, UNICODE_LATIN_SMALL_LETTER_SHARP_S) && \
+ ANYOF_FLAGS(n) & ANYOF_UNICODE && \
+ ANYOF_FLAGS(n) & ANYOF_FOLD && \
+ ((e) > (s) + 1) && \
+ toLOWER((s)[0]) == 's' && \
+ toLOWER((s)[1]) == 's')