Fix all the I case foldings as per CaseFold.txt.
Jarkko Hietaniemi [Sun, 30 Dec 2001 21:12:25 +0000 (21:12 +0000)]
p4raw-id: //depot/perl@13964

regcomp.c
regexec.c

index c537eaa..b061991 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -3991,7 +3991,8 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state)
                         UV f;
 
                         uvchr_to_utf8(tmpbuf, value);
-                        f = to_utf8_fold(tmpbuf, foldbuf, &foldlen);
+                        to_utf8_fold(tmpbuf, foldbuf, &foldlen);
+                        f = utf8_to_uvchr(foldbuf, 0);
 
                         if (f != value)
                              Perl_sv_catpvf(aTHX_ listsv, "%04"UVxf"\n", f);
index 3f1449d..3860fd2 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -995,8 +995,9 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
                        UV f;
 
                        uvchr_to_utf8(tmpbuf, c);
-                       f = to_utf8_fold(tmpbuf, foldbuf, &foldlen);
-
+                       to_utf8_fold(tmpbuf, foldbuf, &foldlen);
+                       f = utf8_to_uvchr(foldbuf, 0);
+                       
                        if (c == (UV)UNICODE_GREEK_CAPITAL_LETTER_SIGMA ||
                            c == (UV)UNICODE_GREEK_SMALL_LETTER_FINAL_SIGMA)
                            c = (UV)UNICODE_GREEK_SMALL_LETTER_SIGMA;