Closed karenetheridge closed 8 years ago
This is also a major bug for Perl::ToPerl6.
The same error is triggered by unquoted utf8 hash keys:
use utf8;
my %h = ( é => 'eacute' );
redundant with #22.
The easiest thing to do would be to add an argument to new
to pass the encoding parameter in, e.g.:
my $ppi = PPI::Document->new("Foo/Bar.pm", encoding => ':encoding(UTF-8)');
This should work. @rjbs and I are poking through things to confirm that everything works properly if decoded/wide characters are passed as in PPI::Document->new(\$decoded_string_containign_wide_chars)
.
When attempting to parse a .pm that contains:
I get:
The regex for an acceptable token needs to be updated; unicode in symbols has been supported in core since at least perl 5.16.
(related: https://github.com/adamkennedy/PPI/issues/22, https://github.com/adamkennedy/PPI/issues/26)