Posted by Andy Hassall on 12/08/06 21:12
On 8 Dec 2006 07:29:39 -0800, "Laangen_LU" <patrick.huss@gmail.com> wrote:
>my first post to this group, so if I'm on the wrong group, my
>apologies.
>
>I'm trying to send out an email in Chinese lanuage using the mail()
>function in PHP.
>
>Subject and mailbody are stored as Unicode entities (eg. 註)
>
>The mail body renders perfectly in all tested emailclients if the mail
>is sent as html.
>
>Only the subject displays the entities but does not render the Chinese
>chars.
>
>Any ideas on how to get the mail sent with the subject displaying
>correctly?
>
>Thank you in advance for any clue available on this topic.
Encoding in headers of mail messages uses a different scheme to HTML. I
believe the specification you want is RFC 1342 "Representation of Non-ASCII
Text in Internet Message Headers" (http://rfc.net/rfc1342.html)
You'll likely have to decode the subject's HTML entity references and recode
them as above.
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
[Back to original message]
|