in reply to Re: problems packing 8 bit data
in thread problems packing 8 bit data
...because your copy of perl has been built with perlIO, and STDOUT has--by default I assume as you don't know about it--IO layer :utf enabled.
This means that characters above the 7-bit ascii limit are converted to their utf (16-bit) representation on output. Using binmode on STDOUT removes this layer and so the convertion is not done.
Looking at perldelta, I cannot find anything to indicate that STDOUT would be opened :utf by default, but if you aren't doing anything to enable this yourself, I assume it must be?
See the section of Perldelta headed "PerlIO is now the default" and follow the various links close to the bottom of the section for more information.
|
|---|