Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: convert files to ansi (8859-1)

by Corion (Patriarch)
on Mar 29, 2017 at 07:54 UTC ( [id://1186324]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    eval { $sCodepoints = decode( "iso-8859-1", $sLine, Encode::FB_CROAK )
    + };
    if ( $@ )
    ...
        print "> No ISO-8859-1, maybe UTF8 ?\n";
        $sCodepoints = $sLine;
    }
    
  2. or download this
    for my $encoding_candidate (qw(iso-8859-1 UTF-8)) {
    eval { $sCodepoints = decode( $encoding_candidate, $sLine, Encode::FB_
    +CROAK ) };
    ...
        #$sCodepoints = $sLine;
    }
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (None)
    As of 2024-04-25 00:23 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found