diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-02-20 11:27:03 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-02-28 17:41:14 -0700 |
commit | 96f54887615ec13b0713f735c3ec6618468ec51f (patch) | |
tree | e3131b3f219a15d8e94f601c12d45ef079f1ae00 /regcomp.c | |
parent | b4069bca6054692e4fffa8e9e04572511e910fbd (diff) | |
download | perl-96f54887615ec13b0713f735c3ec6618468ec51f.tar.gz |
(?foo:...) loses passed in charset
This commit looks for the passed-in charset, and overrides it only if it
is /d and the pattern requires /u. Previously the passed-in value was
ignored.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -8010,9 +8010,12 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth) U32 posflags = 0, negflags = 0; U32 *flagsp = &posflags; char has_charset_modifier = '\0'; - regex_charset cs = (RExC_utf8 || RExC_uni_semantics) - ? REGEX_UNICODE_CHARSET - : REGEX_DEPENDS_CHARSET; + regex_charset cs = get_regex_charset(RExC_flags); + if (cs == REGEX_DEPENDS_CHARSET + && (RExC_utf8 || RExC_uni_semantics)) + { + cs = REGEX_UNICODE_CHARSET; + } while (*RExC_parse) { /* && strchr("iogcmsx", *RExC_parse) */ |