Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Decode character encodings, warn on user mistake

by merlyn (Sage)
on Dec 22, 2009 at 16:24 UTC ( [id://813922]=note: print w/replies, xml ) Need Help??


in reply to Decode character encodings, warn on user mistake

Did you find Encode::Guess unsuitable? Or is this doing a different task?

-- Randal L. Schwartz, Perl hacker

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

  • Comment on Re: Decode character encodings, warn on user mistake

Replies are listed 'Best First'.
Re^2: Decode character encodings, warn on user mistake
by ambrus (Abbot) on Dec 22, 2009 at 17:17 UTC

    Yes, using Encode::Guess might have worked too I suppose. That would require restricting myself to reading the whole input at once, but that wouldn't be too bad in this application anyway. However, if I read the whole input at once, that would have simplified my code a great deal too, and in that case I don't think Encode::Guess would have helped much compared to just testing for utf-8 and ascii input by hand. This code I can at least reuse later if I really need to read character encoded text data one line at a time in some program.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-20 00:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found