View Full Version : Mail() send with the chinese characters problem

11-29-2003, 04:35 AM
Hi all,

I would like to know how to solve a mail problem. It is the message having the chinese characters (GB2312). Some of these characters cannot be displayed well. :(

I have already set

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

in the input page. And I have set the mail header is

$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=GB2312\r\n";

It is found that some chinese characters cannot be displayed well formed through the mail function. But, all chinese characters is shown if I used PHP to print (echo $message;) it on the webpage.:confused: :confused:

11-29-2003, 10:26 PM
Maybe the page that you view your email, can't recognize this kind of characters.

12-01-2003, 08:44 AM
I have found one special reason.

This is prblem is not caused by the special characters. It is caused by the length of the content of the email.

When the length of the string of content (simplified chinese) around 1000, the content of the email will NOT be displayed well. The unwell characters are around the tail of the content.

I have tried the wordwrap() function. It failed in mail function. Is it related to the email server to block the sentence without space around 1024 characters?

just paste the testing message.

Ƽ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ 簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫ Ƽ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫ Ƽ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ 簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫ Ƽ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫƼ簲ȫ Ƽ簲ȫ