More Unicode casing fixes.
authorJarkko Hietaniemi <jhi@iki.fi>
Sat, 22 Dec 2001 04:27:46 +0000 (04:27 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 22 Dec 2001 04:27:46 +0000 (04:27 +0000)
p4raw-id: //depot/perl@13844

regexec.c
t/op/pat.t

index b7528e7..1ad4003 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -972,7 +972,8 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
                        if ( utf8_to_uvchr((U8*)s, &len) == c1
                             && (ln == 1 ||
                                 ibcmp_utf8(s, do_utf8,  strend - s,
-                                           m, UTF, ln)) )
+                                           m, UTF, ln))
+                            && (norun || regtry(prog, s)) )
                            goto got_it;
                        s += len;
                    }
@@ -982,7 +983,8 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
                        if ( (c == c1 || c == c2)
                             && (ln == 1 ||
                                 ibcmp_utf8(s, do_utf8, strend - s,
-                                           m, UTF, ln)) )
+                                           m, UTF, ln))
+                            && (norun || regtry(prog, s)) )
                            goto got_it;
                        s += len;
                    }
index ee7a736..e4556ee 100755 (executable)
@@ -6,7 +6,7 @@
 
 $| = 1;
 
-print "1..769\n";
+print "1..770\n";
 
 BEGIN {
     chdir 't' if -d 't';
@@ -2324,3 +2324,20 @@ print "# some Unicode properties\n";
     print $lower =~ m/[$UPPER]/i ? "ok 768\n" : "not ok 768\n";
     print $UPPER =~ m/[$lower]/i ? "ok 769\n" : "not ok 769\n";
 }
+
+{
+    use warnings;
+    use charnames ':full';
+    
+    print "# GREEK CAPITAL LETTER SIGMA vs COMBINING GREEK PERISPOMENI\n";
+
+    my $SIGMA = "\N{GREEK CAPITAL LETTER SIGMA}";
+
+    my $hSIGMA = sprintf "%04x", ord $SIGMA;
+    
+    my $char = "\N{COMBINING GREEK PERISPOMENI}";
+    my $code = sprintf "%04x", ord($char);
+
+    # Before #13843 this was failing.
+    print "_:$char:_" =~ m/_:$SIGMA:_/i ? "not ok 770\n" : "ok 770\n";
+}