summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-12-30 20:04:32 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-30 20:04:32 +0000
commit254ba52af7d39101b8ee76681bf95a1a95ebd042 (patch)
tree151569cef510eeaa419754ff11c6e8297f3b1aaa /regcomp.c
parentd2ee51b61413d0946f6558ae280350393bbe9b35 (diff)
downloadperl-254ba52af7d39101b8ee76681bf95a1a95ebd042.tar.gz
Fix all the C(ommon) case foldings as per CaseFold.txt.
p4raw-id: //depot/perl@13963
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/regcomp.c b/regcomp.c
index b5d9860631..c537eaadbd 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -3985,6 +3985,17 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state)
Perl_sv_catpvf(aTHX_ listsv, "%04"UVxf"\n",
(UV)value);
if (FOLD) {
+ U8 tmpbuf [UTF8_MAXLEN+1];
+ U8 foldbuf[UTF8_MAXLEN_FOLD+1];
+ STRLEN foldlen;
+ UV f;
+
+ uvchr_to_utf8(tmpbuf, value);
+ f = to_utf8_fold(tmpbuf, foldbuf, &foldlen);
+
+ if (f != value)
+ Perl_sv_catpvf(aTHX_ listsv, "%04"UVxf"\n", f);
+
if (value == UNICODE_GREEK_SMALL_LETTER_FINAL_SIGMA) {
Perl_sv_catpvf(aTHX_ listsv, "%04"UVxf"\n",
(UV)UNICODE_GREEK_CAPITAL_LETTER_SIGMA);