This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regexec.c: utf8 doesn't match /i nonutf8 self
This is a continuation of [perl #78464]. It fixes it also for the /i
flag. After this, a character should match itself in the regrepeat
function, even if one is in utf8 and the other isn't, for both /i and
not.
The solution is to move the code for handling /i into the non-i
structure so that the decisions about utf8 are all in one place. When
the string is in utf8, it uses the utf8-fold function.
This has the added effect of fixing a few cases where a utf8 string did
not match a fold in a non-utf8 pattern. I haven't added tests for
these, as it only fixes a few cases where this is a problem, and I'm
working on a comprehensive solution to the problem, accompanied by
extensive tests.