Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Answer: How do I determine encoding format of a file ?

by idsfa (Vicar)
on Apr 11, 2006 at 16:37 UTC ( #542602=categorized answer: print w/replies, xml ) Need Help??

Q&A > files > How do I determine encoding format of a file ? - Answer contributed by idsfa

File::BOM provides get_encoding_from_filehandle and get_encoding from_stream to identify the encoding of Unicode files. Example:

use File::BOM qw( :all ); open $fh, '<', $filename; my ($encoding) = get_encoding_from_filehandle($fh);

Log In?

What's my password?
Create A New User
[shmem]: hmm module takeover... any hints? I'm being lazy wrt searches
[choroba]: Contact the author, ask other to help contacting the author, write to pause admins
[shmem]: ah perlfaq7
[shmem]: thanks choroba, found it. 'Tis about MJD Devel::Trace
[shmem]: I'd like to upload a v0.13

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (11)
As of 2018-02-23 14:49 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (302 votes). Check out past polls.