# New Ticket Created by Håkon Hægland # Please include the string: [perl #128788] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=128788 > ( 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.Thread Previous | Thread Next