Change 13376 by jhi@alpha on 2001/11/30 01:16:22

        Add a note about folding vs lowercase.

Affected files ...

.... //depot/perl/regexec.c#209 edit

Differences ...

==== //depot/perl/regexec.c#209 (text) ====
Index: perl/regexec.c
--- perl/regexec.c.~1~  Thu Nov 29 18:30:05 2001
+++ perl/regexec.c      Thu Nov 29 18:30:05 2001
@@ -959,6 +959,14 @@
 
            if (do_utf8) {
                STRLEN len;
+               /* The ibcmp_utf8() uses to_uni_fold() which is more
+                * correct folding for Unicode than using lowercase.
+                * However, it doesn't work quite fully since the folding
+                * is a one-to-many mapping and the regex optimizer is
+                * unaware of this, so it may throw out good matches.
+                * 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)
                    while (s <= e) {
                        if ( utf8_to_uvchr((U8*)s, &len) == c1
End of Patch.

Reply via email to