Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: PerlIO: crlf layer on Windows interfering with UCS-2 unicode

by ikegami (Patriarch)
on Jun 03, 2008 at 10:53 UTC ( [id://689841] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    
    binmode STDIN, ':raw:encoding(ucs-2le):crlf:utf8' or die;
    dump_layers STDIN;
    
  2. or download this
    unix encoding(UCS-2LE) utf8 crlf utf8
    unix encoding(UCS-2LE) utf8 crlf utf8
    unix crlf encoding(UCS-2LE) utf8
    unix crlf encoding(UCS-2LE) utf8
    
  3. or download this
    binmode $fh, ':raw:pop:encoding(ucs-2le):crlf:utf8';
    #                  ^^^