This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: [perl #130656] tr// failue with UTF-8 across lines
This bug happend under things like
tr/\x{101}-\x{200}/
\x{201}-\x{301}/
The newline in the middle was crucial. As a result the second line got
parsed already knowing that the result was UTF-8, and as a result
setting a variable got skipped which happens only when we discover we
need to flip into UTF-8.
The solution adopted here is to set the variable under other conditions,
which leads to it getting set multiple times. But this extra branch and
setting is confined to somehwat rare circumstances, leaving the mainline
code untouched.