Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

letters with diacritics when sending mail

by katzuma (Acolyte)
on Sep 30, 2002 at 18:26 UTC ( [id://201795]=perlquestion: print w/replies, xml ) Need Help??

katzuma has asked for the wisdom of the Perl Monks concerning the following question:

I'm doing this html form for the italian site-admin to send some mail and i don't know how to handle words with diacritics such as 'città' or 'àèìòù'..... the mail text arrives all wrong is this a platform problem? (he's on a Mac) or maybe a 'locale' problem? Thanks a lot
  • Comment on letters with diacritics when sending mail

Replies are listed 'Best First'.
Re: letters with diacritics when sending mail
by zigdon (Deacon) on Sep 30, 2002 at 18:33 UTC

    you have to encode your mail, as SMTP is really meant to deal with 7bit chars. I think that you can just add a "Content-encoding: 8 bit" header, but wouldn't bet money on it. Another way, that would almost certainly work, is to encode your mail QP. See Mime::QuotedPrint.

    -- Dan

Re: letters with diacritics when sending mail
by Aristotle (Chancellor) on Sep 30, 2002 at 19:52 UTC

    You have to encode the mail in a proper character set and include the appropriate Content-Type header as in Content-Type: text/plain; charset=iso-8859-1 if your message is encoded in ISO-8859-1.

    One of the many MIME or other modules would be a good way to get your message properly encoded in the first place. The already suggested MIME::QuotedPrint is not a bad idea - the messages remain mostly human readable that way.

    Makeshifts last the longest.

      I've tried both methods: charset doesn't change the result at all (i get the same mistakes) while using QuotedPrint i receive the message encoded( like this:'=88=DD=88=AE=88=A8=88=BE=88=BC')
        This might mean that the recipient's mail reader (MUA) doesn't handle QuotedPrintable correctly, or that you aren't sending the correct headers for it to recognize it.

        Sending in 8bit is not recommended, since you might have different encodings on the sender side and the recipient side.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-25 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found