Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Chicanery Needed to Handle Unicode Text on Microsoft Windows

by kcott (Abbot)
on Oct 30, 2010 at 09:15 UTC ( #868437=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!perl
    
    ...
    
    close $out_fh;
    close $in_fh;
    
  2. or download this
    $ cat -vet utf16_LE_prob.unix_dat utf16_LE_prob.dos_dat
    Line 1$
    ...
    Line 1^M$
    Line 2^M$
    ^M$
    
  3. or download this
    $ cat -vet utf16_LE_prob.unix_out
    Line 1$
    Line 2$
    $
    
  4. or download this
    $ cat -vet utf16_LE_prob.dos_out
    Line 1^M$
    Line 2^M$
    ^M$
    
  5. or download this
    while (my $line = <$in_fh>) {
        chomp $line,
        print $out_fh $line, $/;
    }
    
  6. or download this
    $ cat -vet utf16_LE_prob.unix_out utf16_LE_prob.dos_out
    Line 1$
    ...
    Line 1^M$
    Line 2^M$
    ^M$
    
  7. or download this
    $ cat -vet utf16_LE_prob.unix_out utf16_LE_prob.dos_out
    Line 1$
    ...
    Line 1^M$
    Line 2^M$
    ^M$
    
  8. or download this
    $ cat -vet utf16_LE_prob.unix_out utf16_LE_prob.dos_out
    Line 1$
    ...
    Line 1^M$
    Line 2^M$
    ^M$
    
  9. or download this
    $ cat -vet utf16_LE_prob.unix_out utf16_LE_prob.dos_out
    Line 1$
    ...
    Line 1^M$
    Line 2^M$
    ^M$
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2014-12-26 14:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls