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 ec7784b4e79ac75599f2c7705b9389e05d47d1d1 on Ubuntu Linux 16.04 LTS. -- James E Keenan (jkeenan@cpan.org) --- via perlbug: queue: perl5 status: new https://rt.perl.org/Ticket/Display.html?id=128788Thread Next