-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unicode issue reporting #11
Comments
Are you objecting to the errors (from not seeing the right encoding) or are you objecting to the error message not including the file/line number or both? More generally, what would you want to get if you check contents_match on a set of mixed encoding files? |
"objecting" sounds too negative, I would like to know which of my text files generated this warning and in which line. I don't have an answer to the more general question. I just saw those errors and did not know where did they come from and what can I do now. |
According to perldiag, that error you got should be fatal. How did you get "tons of errors"? (Error handler?) |
Note to self: we could trap the error with eval in contents_match and line_match and rethrow it with the offending filename (and line number for line_match) |
no Error handler involved, just plain iteration my $rule = Path::Iterator::Rule->new; my $it = $rule->iter( @argv ); |
Lovely. So perldiag is wrong for some reason or another. Still, I could trap that with a warning handler. Ugh. Or maybe just 'no warnings 'utf8'' and let Perl do the best it can quietly |
my $rule = Path::Iterator::Rule->new;
$rule->contents_match(qr/Perl/);
my $it = $rule->iter( @argv );
while ( my $file = $it->() ) {
say $file;
}
and I get tons of errors like this:
utf8 "\xC6" does not map to Unicode at /home/gabor/perl-5.18.0-desktop/lib/site_perl/5.18.0/Path/Iterator/Rule.pm line 500.
It would be probably better to report the file name and line number in the data files that generate this. At least optionally.
Using v1.005 on perl 5.18.0 on Linux
The text was updated successfully, but these errors were encountered: