summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-12-23 16:43:29 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-23 16:43:29 +0000
commit09091399717abb9634c88f60ff8b2384a3297c16 (patch)
treea1b23df22ddffabb56077af6dc5f7515d6a6d7ab /regexec.c
parentb0657ef2a740ab37fc663c0a808851a7a2133b90 (diff)
downloadperl-09091399717abb9634c88f60ff8b2384a3297c16.tar.gz
The funky final sigma casefolding.
p4raw-id: //depot/perl@13866
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/regexec.c b/regexec.c
index d239a70144..7a00dfdd46 100644
--- a/regexec.c
+++ b/regexec.c
@@ -975,7 +975,7 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
* Fortunately, not getting this right is allowed
* for Unicode Regular Expression Support level 1,
* only one-to-one matching is required. --jhi */
- if (c1 == c2)
+ if (c1 == c2) {
while (s <= e) {
if ( utf8_to_uvchr((U8*)s, &len) == c1
&& (ln == len ||
@@ -985,9 +985,13 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
goto got_it;
s += len;
}
- else
+ }
+ else {
while (s <= e) {
UV c = utf8_to_uvchr((U8*)s, &len);
+ if (c == UNICODE_GREEK_CAPITAL_LETTER_SIGMA ||
+ c == UNICODE_GREEK_SMALL_LETTER_FINAL_SIGMA)
+ c = UNICODE_GREEK_SMALL_LETTER_SIGMA;
if ( (c == c1 || c == c2)
&& (ln == len ||
ibcmp_utf8(s, do_utf8, strend - s,
@@ -996,6 +1000,7 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
goto got_it;
s += len;
}
+ }
}
else {
if (c1 == c2)