SPUG: binary data with the high bit set
sthoenna at efn.org
Mon Mar 7 12:10:35 PST 2005
On Mon, Mar 07, 2005 at 12:07:57PM -0600, jlb wrote:
> ah, binmode fixed it. d'oh.
> I never thought you had to use that under non-windows OSes, but I suppose
> it's a good habit to be in anyway.
Welcome to a brave new unicode world, where binmode does make a
difference if you have a utf8 locale set (as is the default with
RedHat 8 and up, for instance). This change (perl automatically
outputing utf8 given a utf8 locale for non-binary filehandles) was
actually enough trouble that it was removed in 5.8.1 and has to be
explicitly requested via the new (repurposed) -C switch.
See http://search.cpan.org/perldoc/perl581delta.pod for details.
More information about the spug-list