On Sat, May 15, 2010 at 9:29 PM, Eric Brine <ikegami@adaelis.com> wrote: > A workaround that will work for you is to make a new handle from the fd. > (Creating a new handle from the handle suffers from the bug too.) As a > possible bonus, you don't affect the layers of the original handle. Nice. I'll upload a new version of the module to see if it makes testers happy. Thank you! > > #!perl > use strict; > use IO::File; > use POSIX qw(SEEK_SET); > use Test::More; > > my $t = IO::File->new_tmpfile; > binmode $t, ":utf8"; > print $t chr(3434); > > $t->flush; > open my $t2, '<&=:perlio:raw', fileno($t) or die $!; > seek $t2, 0, SEEK_SET; > > my $s = <$t2>; > is length $s, 3; > ok !utf8::is_utf8($s); > > done_testing; > > -- Tatsuhiko MiyagawaThread Previous