Forum Moderators: coopster

Message Too Old, No Replies

How to create e-mails in Simplified Chinese

Avoid garbeled UTF-8 encoding using PHP

         

antizwerg

3:53 pm on Jul 31, 2004 (gmt 0)

10+ Year Member



Hello,

we just got ourselves our first server in simplified Chinese (actually a localised version of one of our customers servers).

For the web pages we are using UTF-8 and it works fine. However I've got problems creating feedback mails or form mails in Chinese with php.

My questions:

1. Does it even make sense to send the feedback mails encoded in UTF-8 / plain text? A quick sweep of my incoming spam mail shows a definite preference for GB2312 and HTML multipart encoding with the spammers.
Would the Chinese representatives of the company even be able to read UTF-8 mails?

If another plain text encoding is prefered by speakers of Chinese, how do I convert the encodings? The documentation of mb_convert_encoding() only has Japanese examples in it.

2. I got the mbstring-Extensions installed but mb_send_mail() seems to do more damage than good. All the mails I encrypted ended up competely unreadable -while I was still able to read the body when just using mail() without any encrypting.

I couldn't find much documentation on these functions apart from the official manuals. Could you give me a hint where to look for further reading on the mbstring-Functions?

3. Is it possible that installing the mb-string extensions for PHP wasn't enough? Maybe the server mail system needs some modification as well (... like setting of different locales for the mail server or something in the like?) Our Linux server settings are supposedly Latin-1 all over the place by default... (please excuse the ignorant phrasing - I am not a system administrator... :-))

ergophobe

8:13 pm on Jul 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm still on the first CD of "Learning Mandarin" so I can't help much, but I have wrestled a lot with character encoding issues, so I feel your pain.

Questions regarding Chinese come up here relatively often. This Google search [google.com] should find several.

Tom