diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-09 01:48:17 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-09 01:48:17 +0000 |
commit | a2a2844f59a5c91f404052ef98a588c171fc29f8 (patch) | |
tree | 8b092ed3c5e9c339489f3bf17095bf3c1ac94443 /regcomp.c | |
parent | c212f17ff77261a4792bfbd46a1471e8c17417e0 (diff) | |
download | perl-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) |