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