summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-10-09 01:48:17 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-10-09 01:48:17 +0000
commita2a2844f59a5c91f404052ef98a588c171fc29f8 (patch)
tree8b092ed3c5e9c339489f3bf17095bf3c1ac94443 /regcomp.c
parentc212f17ff77261a4792bfbd46a1471e8c17417e0 (diff)
downloadperl-a2a2844f59a5c91f404052ef98a588c171fc29f8.tar.gz
Make the toupper/lower/title API for Unicode not right
but at least less wrong: prepare for the mapping being more than just one-character-to-one-character. p4raw-id: //depot/perl@12371
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/regcomp.c b/regcomp.c
index 69fe024fc4..a223533526 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -2962,6 +2962,8 @@ tryagain:
register char *p;
char *oldp, *s;
STRLEN numlen;
+ STRLEN ulen;
+ U8 tmpbuf[UTF8_MAXLEN*2+1];
parse_start = RExC_parse - 1;
@@ -3104,10 +3106,8 @@ tryagain:
if (RExC_flags16 & PMf_EXTENDED)
p = regwhite(p, RExC_end);
if (UTF && FOLD) {
- if (LOC)
- ender = toLOWER_LC_uvchr(ender);
- else
- ender = toLOWER_uni(ender);
+ toLOWER_uni(ender, tmpbuf, &ulen);
+ ender = utf8_to_uvchr(tmpbuf, 0);
}
if (ISMULT2(p)) { /* Back off on ?+*. */
if (len)