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

Owner: Nobody in particular
Requestors: bbkr [...]

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

Subject: utf8 flag is randomly maintained in autoactions on v5.20+
Download (untitled) / with headers
text/plain 859b
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: [ #99981] utf8 flag is randomly maintained in autoactions on v5.20+
Date: Tue, 4 Nov 2014 19:25:56 +1100
To: bug-Regexp-Grammars [...]
From: Damian Conway <damian [...]>
Download (untitled) / with headers
text/plain 204b
Thanks for this report also. The behaviour is most likely related to that reported already under which has been passed on to teh core developers. Damian

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to