diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-03-14 09:18:28 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-03-14 09:45:06 -0600 |
commit | 295c2f7d5349d9417307a84d22b5ba63d9a655ed (patch) | |
tree | 9be87255bdb8c11a0650b92ed991012c4bad13c1 /regcomp.c | |
parent | 72d70e5644e8e9254a0e459933aaaec0b6fa01b3 (diff) | |
download | perl-295c2f7d5349d9417307a84d22b5ba63d9a655ed.tar.gz |
regcomp.c: utf8 pattern implies uni rules
This fixes a regression introduced with charset regex modifiers. A utf8
pattern without a charset is supposed to mean unicode semantics. But
it didn't until this patch.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -6996,7 +6996,9 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth) U32 posflags = 0, negflags = 0; U32 *flagsp = &posflags; bool has_charset_modifier = 0; - regex_charset cs = REGEX_DEPENDS_CHARSET; + regex_charset cs = (RExC_utf8 || RExC_uni_semantics) + ? REGEX_UNICODE_CHARSET + : REGEX_DEPENDS_CHARSET; while (*RExC_parse) { /* && strchr("iogcmsx", *RExC_parse) */ |