I
Ilya Zakharevich
What should one fix to make UCS-2* encodings work on the file handles
in Perl? E.g., should not
perl -wlpe "BEGIN{binmode STDOUT, qencoding(UCS-2));}" < xyz > xyz1
just work? Currently, it requires additional `binmode STDOUT' in
advance, which changes the semantic. And doing
binmode STDOUT;
binmode STDOUT, qencoding(UCS-2));
binmode STDOUT, qcrlf);
does not work, since :crlf layer is put AFTER :encoding, not before it
as expected...
Another indication is that
piconv -t UCS-2
gives wrong results on DOSISH platforms (which is not surprizing,
since the version I have uses qencoding(UCS-2))).
For best results, I would prefer a solution which allows doing
binmode STDOUT, qencoding(UCS-2));
and
binmode STDOUT, qcrlf);
in arbitrary order so that the result does not depend on the order
(as now), but works ;-/.
Thanks,
Ilya
in Perl? E.g., should not
perl -wlpe "BEGIN{binmode STDOUT, qencoding(UCS-2));}" < xyz > xyz1
just work? Currently, it requires additional `binmode STDOUT' in
advance, which changes the semantic. And doing
binmode STDOUT;
binmode STDOUT, qencoding(UCS-2));
binmode STDOUT, qcrlf);
does not work, since :crlf layer is put AFTER :encoding, not before it
as expected...
Another indication is that
piconv -t UCS-2
gives wrong results on DOSISH platforms (which is not surprizing,
since the version I have uses qencoding(UCS-2))).
For best results, I would prefer a solution which allows doing
binmode STDOUT, qencoding(UCS-2));
and
binmode STDOUT, qcrlf);
in arbitrary order so that the result does not depend on the order
(as now), but works ;-/.
Thanks,
Ilya