Subject: | please use "PerlIO*" so as to cooperate with layers |
Date: | Wed, 20 Aug 2008 11:24:01 +1000 |
To: | bug-term-size [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
In the debian perl 5.10.0 the use of FILE* in the Term::Size xsubs does
some bad stuff to perlio layers. In particular if you try to set for
direct :utf8 output that flag ends up turned off by Term::Size::chars().
Eg.
use strict;
use warnings;
use Term::Size;
binmode STDOUT, ':utf8' or die;
print "\x{263A}\n";
Term::Size::chars(\*STDOUT);
print "\x{263A}\n";
=> Wide character in print at foo.pl line 7
I get some joy from the change below. I think it doesn't lose any
portability, since if you believe what you read "PerlIO*" pointer and
funcs go right back to 5.003 and are simply aliases for FILE* until the
layers in 5.7.3 or 5.8.3 or whenever.
Message body is not shown because sender requested not to inline it.