Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Mail::Sender character set/encoding

by zwon (Abbot)
on Mar 12, 2009 at 19:55 UTC ( [id://750248]=note: print w/replies, xml ) Need Help??


in reply to Mail::Sender character set/encoding

You specified charset=us-ascii and that means that any characters with codes more than 0x80 are illegal. Try to specify latin1 or whatever your actual charset is.

Replies are listed 'Best First'.
Re^2: Mail::Sender character set/encoding
by Rodster001 (Pilgrim) on Mar 12, 2009 at 20:26 UTC
    Hey Thanks, that was it (latin1). Is there a universal way of determining a character set being used (i.e. in a given email, word document, text file, etc). Or do you have to poke around or just "know". Thanks again!
      Is there a universal way of determining a character set being used

      You can try Encode::Guess, but generally it's better to "just know", as there's no easy failsafe way to determine encodings. In other words, the module can tell apart UTF-8 from ISO-8859-1, but is having a hard time figuring out if something is ISO-8859-1 or ISO-8859-15... (typically, you'd also need to specify potential candidates as hints, e.g. via ->set_suspects())

        So, to "just know" is it a matter of being familiar with different character encoding sets and the context of the document in question (for example, a text file created with vi on my machine, an email from China, or a Word attachment from Zimbabwe)?

        I took at look at this page http://en.wikipedia.org/wiki/Character_encoding most of that is fairly familiar to me. It did add a little to the confusion that latin1 or us-ascii wasn't mentioned on that page (ok, I know Wiki is not the definitive source).

        I suppose like anything else, experience is valuable. So after this, I guess I know a little more.

      There are some modules that can detect text encoding, but generally you should just know.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-03-28 16:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found