lalor dot net

Chinese Email Forms

There does not seem to be a definitive answer to correctly present Chinese language emails that are generated from online forms. I found this out whilst creating an online enquiry form for a Chinese site.The Chinese characters would appear in the my inboxes as garbled characters rather than the true Chinese characters they should be. UTF-8 should be used for Charsets both in the HTML document and the PHP Email Class. This allowed the body of the email message to display correctly but the subject was a different matter.

After scouring php.net for a while as well as google I stumbled upon some code that allowed the subject to be displayed correctly: $esubject = “=?big5?Q?”.$subject.”?=”;

big5 is the charset I wanted the subject to be displayed in

Q is the Content-Transfer-Encoding, in this case quoted-printable

$subject is my subject variable

COMMENTS

add your thoughts