Skip to content
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

Can't turn off "does not map to Unicode" warnings #15489

Closed
p5pRT opened this issue Jul 31, 2016 · 10 comments
Closed

Can't turn off "does not map to Unicode" warnings #15489

p5pRT opened this issue Jul 31, 2016 · 10 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 31, 2016

Migrated from rt.perl.org#128788 (status was 'open')

Searchable as RT128788$

@p5pRT
Copy link
Author

p5pRT commented Jul 31, 2016

From @hakonhagland

( Note​: I first tried to send this as a followup to [perl #88592], but I
got reply from
bugs-correspond@​bugs6.perl.org : "Could not find a ticket with id 88592" )

This bug​:

( https://rt.cpan.org/Public/Bug/Display.html?id=88592 )

is still present in my perl 5.22.1. From the last post in the ticket it
seems like it was fixed with a pull request to the Encode module in october
2014...

$ perl -v
This is perl 5, version 22, subversion 1 (v5.22.1) built for
x86_64-linux-gnu-thread-multi
(with 58 registered patches, see perl -V for more detail)

Here is a test script​:

use open qw( :std :utf8 );
use strict;
use warnings;
no warnings 'utf8';
my $bytes = "Test\x{E5}End";
my $fn = 'test.txt';
open ( my $fh, '>​:raw', $fn ) or die "Could not open file '$fn'​: $!";
print $fh $bytes;
close $fh;
open ( $fh, "<​:encoding(utf-8)", $fn ) or die "Could not open file '$fn'​:
$!";
my $str = do { local $/; <$fh> };
close $fh;

the output on my machine (x86_64 GNU/Linux)​:

utf8 "\xE5" does not map to Unicode at ./p.pl line 11.

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2016

From @jkeenan

On Sun Jul 31 14​:31​:05 2016, hakon.hagland@​gmail.com wrote​:

( Note​: I first tried to send this as a followup to [perl #88592], but I
got reply from
bugs-correspond@​bugs6.perl.org : "Could not find a ticket with id 88592" )

This bug​:

( https://rt.cpan.org/Public/Bug/Display.html?id=88592 )

is still present in my perl 5.22.1. From the last post in the ticket it
seems like it was fixed with a pull request to the Encode module in october
2014...

$ perl -v
This is perl 5, version 22, subversion 1 (v5.22.1) built for
x86_64-linux-gnu-thread-multi
(with 58 registered patches, see perl -V for more detail)

Here is a test script​:

use open qw( :std :utf8 );
use strict;
use warnings;
no warnings 'utf8';
my $bytes = "Test\x{E5}End";
my $fn = 'test.txt';
open ( my $fh, '>​:raw', $fn ) or die "Could not open file '$fn'​: $!";
print $fh $bytes;
close $fh;
open ( $fh, "<​:encoding(utf-8)", $fn ) or die "Could not open file '$fn'​:
$!";
my $str = do { local $/; <$fh> };
close $fh;

the output on my machine (x86_64 GNU/Linux)​:

utf8 "\xE5" does not map to Unicode at ./p.pl line 11.

Reproduced in blead at commit ec7784b on Ubuntu Linux 16.04 LTS.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2016

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2016

From zefram@fysh.org

Hakon Haegland wrote​:

( Note​: I first tried to send this as a followup to [perl #88592], but I
got reply from
bugs-correspond@​bugs6.perl.org : "Could not find a ticket with id 88592" )

Probably because it's not a Perl 6 bug. That email address looks like
it's specific to Perl 6.

-zefram

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2016

From alex@chmrr.net

On Mon, 1 Aug 2016 07​:44​:26 +0100
Zefram <zefram@​fysh.org> wrote​:

Hakon Haegland wrote​:

( Note​: I first tried to send this as a followup to [perl #88592], but I
got reply from
bugs-correspond@​bugs6.perl.org : "Could not find a ticket with id 88592" )

Probably because it's not a Perl 6 bug. That email address looks like
it's specific to Perl 6.

That email address works with anything in rt.perl.org, which
includes both perl5 and perl6 -- but the bug you're referencing is on
rt.cpan.org, which has its own bug numbers. You'd have needed to
email bug-Encode@​rt.cpan.org.

But I'm also the person who pops up halfway into that ticket. The test
I provided, and the solution it arrived at, looks to not have affected
the `open(..., "<​:encoding(utf-8)") codepath, only the Encode​::encode
ones. So the latest Encode does not actually resolve that bug.
- Alex

[1] dankogai/p5-encode@07c8adb5

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2016

From @xsawyerx

On Mon Aug 01 00​:37​:06 2016, chmrr wrote​:

On Mon, 1 Aug 2016 07​:44​:26 +0100
Zefram <zefram@​fysh.org> wrote​:

Hakon Haegland wrote​:

( Note​: I first tried to send this as a followup to [perl #88592],
but I
got reply from
bugs-correspond@​bugs6.perl.org : "Could not find a ticket with id
88592" )

Probably because it's not a Perl 6 bug. That email address looks
like
it's specific to Perl 6.

That email address works with anything in rt.perl.org, which
includes both perl5 and perl6 -- but the bug you're referencing is on
rt.cpan.org, which has its own bug numbers. You'd have needed to
email bug-Encode@​rt.cpan.org.

Considering this is an upstream CPAN module, I think we should close this.

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2016

From @cpansprout

On Mon Aug 01 08​:06​:00 2016, xsawyerx@​cpan.org wrote​:

On Mon Aug 01 00​:37​:06 2016, chmrr wrote​:

On Mon, 1 Aug 2016 07​:44​:26 +0100
Zefram <zefram@​fysh.org> wrote​:

Hakon Haegland wrote​:

( Note​: I first tried to send this as a followup to [perl #88592],
but I
got reply from
bugs-correspond@​bugs6.perl.org : "Could not find a ticket with id
88592" )

Probably because it's not a Perl 6 bug. That email address looks
like
it's specific to Perl 6.

That email address works with anything in rt.perl.org, which
includes both perl5 and perl6 -- but the bug you're referencing is on
rt.cpan.org, which has its own bug numbers. You'd have needed to
email bug-Encode@​rt.cpan.org.

Considering this is an upstream CPAN module, I think we should close this.

I have confirmed that it is a problem with Encode and have just opened <https://rt.cpan.org/Ticket/Display.html?id=116629>.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2016

@cpansprout - Status changed from 'open' to 'rejected'

@p5pRT p5pRT closed this as completed Aug 1, 2016
@p5pRT
Copy link
Author

p5pRT commented Aug 2, 2016

From @cpansprout

On Mon Aug 01 08​:49​:14 2016, sprout wrote​:

On Mon Aug 01 08​:06​:00 2016, xsawyerx@​cpan.org wrote​:

Considering this is an upstream CPAN module, I think we should close
this.

I have confirmed that it is a problem with Encode and have just opened
<https://rt.cpan.org/Ticket/Display.html?id=116629>.

Oh, wait. I had my one-line diagnostic patch still applied to my local perl repo and ran the tests. I got these failures​:

# Failed test 'FB_WARN message utf8'
# at t/fallback.t line 110.
# ''
# doesn't match '(?^​:does not map to Unicode)'

# Failed test 'WARN_ON_ERR message ascii'
# at t/fallback.t line 124.
# ''
# doesn't match '(?^​:does not map to Unicode)'
# Looks like you failed 2 tests of 50.

which suggests to me that PerlIO​::encoding (which is core-only) may well be asking for warnings without checking hints.

I think this is something that needs looking into, so I am reopening the ticket.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Aug 2, 2016

@cpansprout - Status changed from 'rejected' to 'open'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant