This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Can now do /u instead of forcing to utf8
authorKarl Williamson <public@khwilliamson.com>
Sun, 17 Jun 2012 01:52:12 +0000 (19:52 -0600)
committerKarl Williamson <public@khwilliamson.com>
Thu, 2 Aug 2012 15:24:52 +0000 (09:24 -0600)
Now that there is a /u modifier, a regex doesn't have to be in UTF-8 in
order to force Unicode semantics.  Change this relict from the past.

regcomp.c

index cdb1973..fe7837d 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -9694,7 +9694,7 @@ S_reg_namedseq(pTHX_ RExC_state_t *pRExC_state, UV *valuep, I32 *flagp, U32 dept
        return (regnode *) &RExC_parse; /* Invalid regnode pointer */
     }
 
-    REQUIRE_UTF8;      /* named sequences imply Unicode semantics */
+    RExC_uni_semantics = 1; /* Unicode named chars imply Unicode semantics */
     RExC_parse += 2;   /* Skip past the 'U+' */
 
     if (valuep) {   /* In a bracketed char class */