Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by almut (Canon)
on Apr 05, 2007 at 19:07 UTC ( [id://608532]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $filename = "test.ucs2le";
    open my $fh, ">:encoding(ucs-2le)", $filename
                 or die "Cannot open $filename for writing: $!";
    print $fh "\x{feff}\x{8765}\n\x{8765}\n";
    close $fh;
    
  2. or download this
     ff fe 65 87 0d 0a 00 65 87 0d 0a 00
    
  3. or download this
     ff fe 65 87 0d 00 0a 00 65 87 0d 00 0a 00
    
  4. or download this
    my $filename = "test.ucs2le";
    open my $fh, ">:encoding(ucs-2le)", $filename or die;
    my @layers = PerlIO::get_layers($fh); print "@layers\n";
    
  5. or download this
    unix crlf encoding(UCS-2LE) utf8
    
  6. or download this
    my $filename = "test.ucs2le";
    open my $fh, ">:raw:encoding(ucs-2le):crlf:utf8", $filename
                 or die "Cannot open $filename for writing: $!";
    print $fh "\x{feff}\x{8765}\n\x{8765}\n";
    close $fh;
    
  7. or download this
    unix encoding(UCS-2LE) utf8 crlf utf8
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://608532]
Approved by Corion
Front-paged by Joost
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-26 00:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found