summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-01-03 20:36:38 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-03 20:36:38 +0000
commitfe36fafc7b6b9510b850af2d06d703ce4feb3c86 (patch)
treeea3416bc6b280e81f6e19233b8204d9ec07589e5 /regcomp.c
parentc2fbc3cae415286de957dc25977f69356ebc9f8a (diff)
downloadperl-fe36fafc7b6b9510b850af2d06d703ce4feb3c86.tar.gz
Do not add the first characters of multicharacter foldings
into character classes. p4raw-id: //depot/perl@14048
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/regcomp.c b/regcomp.c
index cb740432c3..aacae22edb 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4025,9 +4025,10 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state)
to_utf8_fold(tmpbuf, foldbuf, &foldlen);
f = utf8_to_uvchr(foldbuf, 0);
- /* If folding and foldable, insert also
- * the folded version to the charclass. */
- if (f != value)
+ /* If folding and foldable and a single
+ * character, insert also the folded version
+ * to the charclass. */
+ if (f != value && foldlen == UNISKIP(f))
Perl_sv_catpvf(aTHX_ listsv, "%04"UVxf"\n", f);
/* If folding and the value is one of the Greek