Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Perl Windows vs Cygwin installs

by Eliya (Vicar)
on Mar 23, 2012 at 23:56 UTC ( #961335=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/local/perl/5.15.8/bin/perl -w
    
    ...
    
    open my $out, ">:crlf:encoding(UTF-16LE)", $fname or die;
    print $out "\x{feff}\x{1234}\n\x{5678}\n";
    
  2. or download this
    $ ./test-out.pl
    $ hexdump foo.utf16 
    0000000 feff 1234 0a0d 7800 0d56 000a          
    000000c
    
  3. or download this
    $ hexdump foo.utf16 
    0000000 feff 1234 000d 000a 5678 000d 000a     
    000000e
    
  4. or download this
    #!/usr/local/perl/5.15.8/bin/perl -w
    use Devel::Peek;
    ...
    open my $in, "<:crlf:encoding(UTF-16LE)", $fname or die;
    $/ = undef;
    Dump <$in>;
    
  5. or download this
    $ ./test-in.pl
    SV = PV(0x77dc60) at 0x953728
    ...
      PV = 0x829130 "\357\273\277\341\210\264\r\n\345\231\270\r\n"\0 [UTF8
    + "\x{feff}\x{1234}\r\n\x{5678}\r\n"]
      CUR = 13                                ^               ^
      LEN = 14
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://961335]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (13)
As of 2015-07-31 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls