Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

how to check the encoding of a file

by jbrugger (Parson)
on Apr 10, 2006 at 08:00 UTC ( #542225=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    my $encoding = get_encoding_from_filehandle(FH);
    print $encoding . "\n\n";
    
  2. or download this
    use Encode::Guess;
    my $decoder = guess_encoding($arg->{String}, 'latin1');
    ...
    } else {
        return 1;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2020-07-07 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?