This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
create new unicode props as defined in POSIX spec (optionally use them in the regex...
authorYves Orton <demerphq@gmail.com>
Fri, 7 Nov 2008 20:20:21 +0000 (20:20 +0000)
committerYves Orton <demerphq@gmail.com>
Fri, 7 Nov 2008 20:20:21 +0000 (20:20 +0000)
commitda7fcca4b8d6fb4dc88e0305bf9830bf24912ebd
treed05a14842c3d234ee9e4f5d1f692c20733133eb1
parent463559e728b65f7b60e46efa081b43ff1b4b6fa4
create new unicode props as defined in POSIX spec (optionally use them in the regex engine)

Perlbug #60156 and #49302 (and probably others) resolve down to the problem
that the definition of \s and \w and \d and the POSIX charclasses are different
for unicode strings and for non-unicode strings. This broke the character class
logic in the regex engine. The easiest fix to make the character class logic sane
again is to define new properties which do match.

This change creates new property classes that can be used instead of the
traditional ones (it does not change the previously defined ones). If the
define in regcomp.h:

#define PERL_LEGACY_UNICODE_CHARCLASS_MAPPINGS 1

is changed to 0, then the new mappings will be used. This will fix a bunch
of bugs that are reported as TODO items in the new reg_posixcc.t test file.

p4raw-id: //depot/perl@34769
MANIFEST
lib/unicore/mktables
regcomp.c
regcomp.h
t/op/pat.t
t/op/reg_posixcc.t [new file with mode: 0644]