Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Problem with Encode::Guess

by Anonymous Monk
on Nov 10, 2010 at 18:38 UTC ( [id://870642]=note: print w/replies, xml ) Need Help??


in reply to Problem with Encode::Guess

you forgot to binmode

Replies are listed 'Best First'.
Re^2: Problem with Encode::Guess
by jimhenry (Acolyte) on Nov 10, 2010 at 21:42 UTC
    What layer string should I pass to binmode in a context like this, where I don't (by definition) know what encoding the file I'm opening uses? Doing this:
    open FH, $_ or die qq(can't open "$_" for reading\n); binmode FH, ':raw'; my @lines = <FH>; close FH;
    has no effect on the program's behavior, and anything more specific than ":raw" would seem to entail a premature assumption about what encoding an unknown file uses.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-03-29 04:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found