diff options
author | Karl Williamson <khw@cpan.org> | 2015-08-23 10:30:02 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2015-08-24 12:11:33 -0600 |
commit | a0bd1a30d379f2625c307657d63fc50173d7a56d (patch) | |
tree | 7526c17ccb6fcaa679f4fe7cb4bbddf9a4eab466 /pod/perlrecharclass.pod | |
parent | 2d3d6e6e7c2d50b1cc47032cf089151823fb20a6 (diff) | |
download | perl-a0bd1a30d379f2625c307657d63fc50173d7a56d.tar.gz |
Make qr/(?[ ])/ work in UTF-8 locales
Previously use of this under /l regex rules was a compile time error.
Now it works like \b{wb} and \b{sb}, which compile under locale rules
and always work like Unicode says they should. A UTF-8 locale implies
Unicode rules, and the goal is for it to work seamlessly with the rest
of perl. This construct was the only one I am aware of that didn't work
seamlessly (not counting OS interfaces) under UTF-8 LC_CTYPE locales.
For all three of these constructs, use with a non-UTF-8 runtime locale
raises a warning, and Unicode rules are used anyway.
UTF-8 locale collation still has problems, but this is low priority to
fix, as it's a lot of work, and if one really cares, one should be using
Unicode::Collate.
Diffstat (limited to 'pod/perlrecharclass.pod')
-rw-r--r-- | pod/perlrecharclass.pod | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pod/perlrecharclass.pod b/pod/perlrecharclass.pod index ce287710d2..f46de4c801 100644 --- a/pod/perlrecharclass.pod +++ b/pod/perlrecharclass.pod @@ -1106,8 +1106,12 @@ just three limitations: =item 1 -This construct cannot be used within the scope of -C<use locale> (or the C<E<sol>l> regex modifier). +When compiled within the scope of C<use locale> (or the C<E<sol>l> regex +modifier), this construct assumes that the execution-time locale will be +a UTF-8 one, and the generated pattern always uses Unicode rules. What +gets matched or not thus isn't dependent on the actual runtime locale, so +tainting is not enabled. But a C<locale> category warning is raised +if the runtime locale turns out to not be UTF-8. =item 2 |