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 the effect I want by changing to PerlIO* and PerlIO_fileno, but
ppport.h warns that PerlIO_fileno (and PerlIO_stdin) aren't portable
before 5.7.3, even with ppport.h in use.
Is there something hiding in the docs on this sort of thing?
I saw fakesdio.h which looks pretty promising for upward and downward
compatibility, but perlio.h seems to always make a define of
PERLIO_NOT_STDIO, thus never getting to the fakesdio.h case.
Ah, no, of course, it lies, or only means there's no actual layers
before then ...