Skip Menu |

This queue is for tickets about the Regexp-Grammars CPAN distribution.

Report information
The Basics
Id: 99981
Status: open
Priority: 0/
Queue: Regexp-Grammars

People
Owner: Nobody in particular
Requestors: bbkr [...] post.pl
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: utf8 flag is randomly maintained in autoactions on v5.20+
package G; use Regexp::Grammars; my $parser = qr{ <TOP> <rule: TOP>.* }xms; sub interpret { my ($text, $actions) = @_; $parser->with_actions( $actions ); return $text ~~ $parser; } package A; use Encode; use Mouse; sub TOP { my ($self, $match) = @_; printf "TOP autoaction, match=%s is_utf8=%s\n", $match, Encode::is_utf8($match); return $match; } package main; use utf8; G::interpret( 'zażółć gęślą jaźń', A->new); # some polish text G::interpret( 'שלום העולם', A->new); # some RTL text __END__ On Perl 5.20.1 and 5.21.5 it gives following result: --- TOP autoaction, match=zażółć gęślą jaźń is_utf8= TOP autoaction, match=שלום העולם is_utf8=1 --- Flag utf8 is lost for first unicode string but preserved for second. Both are expected to have it.
Subject: Re: [rt.cpan.org #99981] utf8 flag is randomly maintained in autoactions on v5.20+
Date: Tue, 4 Nov 2014 19:25:56 +1100
To: bug-Regexp-Grammars [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Thanks for this report also. The behaviour is most likely related to that reported already under https://rt.cpan.org/Ticket/Display.html?id=99980 which has been passed on to teh core developers. Damian