# New Ticket Created by David Leadbeater # Please include the string: [perl #109828] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=109828 > If a UTF-8 output layer is specified the resulting scalar does not have the UTF-8 flag on. I think this makes sense for output, although there may be other ramifications. Here's a todo test: diff --git a/ext/PerlIO-scalar/t/scalar.t b/ext/PerlIO-scalar/t/scalar.t index a02107b..59b65ad 100644 --- a/ext/PerlIO-scalar/t/scalar.t +++ b/ext/PerlIO-scalar/t/scalar.t @@ -16,7 +16,7 @@ use Fcntl qw(SEEK_SET SEEK_CUR SEEK_END); # Not 0, 1, 2 everywhere. $| = 1; -use Test::More tests => 79; +use Test::More tests => 80; my $fh; my $var = "aaa\n"; @@ -360,3 +360,11 @@ SKIP: { ok has_trailing_nul $memfile, 'write appends null when growing string after seek past end'; } + +# [perl #xxxx] +{ + local $TODO = "UTF-8 support"; + my $string = "\x{ffe}"; + open my $fh, "> :encoding(UTF-8)", \(my $out); + ok $string eq $out; +}Thread Next