From a5961de5f4215b5cd376e88c8c5d267c7f7123f6 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi <jhi@iki.fi> Date: Sat, 22 Dec 2001 02:47:08 +0000 Subject: Unicode casefolding fixes. p4raw-id: //depot/perl@13843 --- regexec.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'regexec.c') diff --git a/regexec.c b/regexec.c index 35a0a6c2b0..b7528e720d 100644 --- a/regexec.c +++ b/regexec.c @@ -4110,9 +4110,12 @@ S_reginclass(pTHX_ register regnode *n, register U8* p, register bool do_utf8) match = TRUE; else if (flags & ANYOF_FOLD) { STRLEN ulen; - U8 tmpbuf[UTF8_MAXLEN_UCLC+1]; + U8 tmpbuf[UTF8_MAXLEN_FOLD+1]; - toLOWER_utf8(p, tmpbuf, &ulen); + to_utf8_fold(p, tmpbuf, &ulen); + if (swash_fetch(sw, tmpbuf, do_utf8)) + match = TRUE; + to_utf8_upper(p, tmpbuf, &ulen); if (swash_fetch(sw, tmpbuf, do_utf8)) match = TRUE; } -- cgit v1.2.1