Mailing List Archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Doing kanji and stuff in email headers

> I'm looking for help with email (calling the mail() function in php): 

For Japanese encoding in particular, and more generally UTF-8 mails, you
can use mb_send_mail():

The comments on that page show examples of how to do it with the plain
mail() function (but still using functions from the mbstring module - I
find this comes installed with even cheap hosting PHP installations the
past few years, and if you control the machine it is very easy to add,
on Ubuntu/Centos at least).

> o Can I after all just use UTF-8 because it's ok nowadays?

As of a few years ago the remaining problem was Docomo, and UTF-8 email
would appear as mojibake. However I *think* that nowadays all carriers
convert UTF-8 to Shift-JIS at the gateway if their handsets cannot
natively support UTF-8.

A quick sample of one shows a UTF-8 Japanese email to a docomo user as
of June this year got read and replied to. Thunderbird used these
headers, so not even base64:
  Content-Type: text/plain; charset=UTF-8
  Content-Transfer-Encoding: 8bit


P.S. When you said "Chinese names, etc." did you mean kanji and
Japanese, or also sending emails to Chinese-speaking countries?

Darren Cook, Software Researcher/Developer (About me and my work) (My blogs and articles)

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links