Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

how to check the encoding of a file

by jbrugger (Parson)
on Apr 10, 2006 at 08:00 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-23 13:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found