Jan Dubois schrieb am 19.01.2011 um 11:08 (-0800):
> You need to stack the I/O layers in the right order. The :encoding()
> layer needs to come last (be at the bottom of the stack), *after* the
> :crlf layer adds the additional carriage returns. The way to pop the
> default :crlf layer is to sta
On Wed, 19 Jan 2011, Michael Ludwig wrote:
> Erland Sommarskog schrieb am 17.01.2011 um 13:57 (-):
> > I'm on Windows and I have this small script:
> >
> >use strict;
> >open F, '>:encoding(UTF-16LE)', "slask2.txt";
> >print F "1\n2\n3\n";
> >close F;
> >
> > When I open the out
Erland Sommarskog schrieb am 17.01.2011 um 13:57 (-):
> I'm on Windows and I have this small script:
>
>use strict;
>open F, '>:encoding(UTF-16LE)', "slask2.txt";
>print F "1\n2\n3\n";
>close F;
>
> When I open the output in a hex editor I see
>
> 31 00 0D 0A 00 32 00 0D 0A
I'm on Windows and I have this small script:
use strict;
open F, '>:encoding(UTF-16LE)', "slask2.txt";
print F "1\n2\n3\n";
close F;
When I open the output in a hex editor I see
31 00 0D 0A 00 32 00 0D 0A 00 33 0D 0A 00
I would expect to see:
31 00 0D 00 0A 00 32 00 0D 00 0A 00