rvtol+perlbug @ isolution . nl schreef:
> #!/usr/bin/perl
>
> # $ID: utf16.pl $
>
> use warnings ;
> use strict ;
>
> my ($fno, $eo) = ('utf16.txt', ':encoding(UTF16)') ;
>
> open my $fho, ">$eo", $fno or die "open '$fno': $!" ;
>
> print $fho "\n" ;
>
> __END__
>
> results in a 5 byte file:
>
> FE FF 00 0D 0A
>
> where I expect 6 bytes:
>
> FE FF 00 0D 00 0A
>
> so I guess the :crlf is in the wrong position of the layer stack.
Work-around: ':raw:encoding(UTF-16):crlf'
(see news:slrnefabt9.pgb.hjp-usenet2@yoyo.hjp.at)
--
Affijn, Ruud
"Gewoon is een tijger."