diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-02-15 12:27:23 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-02-15 18:02:35 -0700 |
commit | 20adcf7c80fc3ad8cffa7d52b95a40d87bd781d0 (patch) | |
tree | 42b6ebc3be70e41366f78282be3e658182a06468 /pp.c | |
parent | 29050de536086566fb4d4a9db818b8068dd118a0 (diff) | |
download | perl-20adcf7c80fc3ad8cffa7d52b95a40d87bd781d0.tar.gz |
pp_quote_meta: in locale, quote all UTF-8 Latin1 non-ASCII
Under locale rules, this commit quotes all non-ASCII Latin1 characters
in UTF-8 encoded strings. This provides consistency with this function
and other functions, such as lc().
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -4097,7 +4097,11 @@ PP(pp_quotemeta) } } else if (UTF8_IS_DOWNGRADEABLE_START(*s)) { - if (_isQUOTEMETA(TWO_BYTE_UTF8_TO_UNI(*s, *(s + 1)))) + + /* In locale, we quote all non-ASCII Latin1 chars. + * Otherwise use the quoting rules */ + if (IN_LOCALE_RUNTIME + || _isQUOTEMETA(TWO_BYTE_UTF8_TO_UNI(*s, *(s + 1)))) { to_quote = TRUE; } |