服务器环境:ubunt feisty,php5.1.2,php5-imap 5.1.2-1ubuntu1
imap_utf8()不能转换GBK编码的汉字,GB2312没有问题
但可以使用iconv_mime_decode($string,0,”UTF-8″)来进行代替
参考: https://bugs.launchpad.net/ubuntu/+source/php5/+bug/137475
BUG重现:
nano test.php
执行:
php5 test.php
服务器环境:ubunt feisty,php5.1.2,php5-imap 5.1.2-1ubuntu1
imap_utf8()不能转换GBK编码的汉字,GB2312没有问题
但可以使用iconv_mime_decode($string,0,”UTF-8″)来进行代替
参考: https://bugs.launchpad.net/ubuntu/+source/php5/+bug/137475
BUG重现:
nano test.php
执行:
php5 test.php
Thanks for this tip and comparison
I used this tip to fix a bug in receiving mails encoded with GBK but charset=gb2312 in the mail header. The mail receiver will use GB2312 to parse the mail but get garbled in some chinese words which are encoded by GBK which covers Traditional Chinese
发表回复