This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix rt75680 - when working with utf8 strings one must always use s+=UTF8SKIP(s) to...
authorYves Orton <demerphq@gmail.com>
Mon, 23 Aug 2010 12:36:37 +0000 (14:36 +0200)
committerYves Orton <demerphq@gmail.com>
Mon, 23 Aug 2010 12:42:20 +0000 (14:42 +0200)
commit92f3d4829170316374b610b3fc665389803d93f8
tree75ec84dc6954d249d557a2b23893c9a87f910edf
parentd67eb5f4852e0f62e6cd359eeceb88a45e6164ea
fix rt75680 - when working with utf8 strings one must always use s+=UTF8SKIP(s) to move to the next char

Most of the regex code where do the two types of increments are wrapped up in macros.

Unfortunately these macros arent suitable in this case because we use goto to jump
inside the loop under some situations, and since this is a one-off case I figured the
modest C&P associated was better than creating a new macro just for this case.

There is still a possible bug here marked by an XXX, which will need to be fixed
once I find out the correct way to simulate strptr--. Additionally I havent found
a test case that actually exposes this form of the bug.

Moral of the story, utf8 makes string scanning awkward... And slow...
regexec.c
t/re/pat.t