简体   繁体   English

如何将Gmail的主题信息更改为中文字符?

[英]How to change the subject info of Gmail into Chinese character?

I got a string =?GB2312?B?zbO8xtGnu/m0ocq10bXP7sS/?= with $overview[0]->subject; 我得到了一个字符串=?GB2312?B?zbO8xtGnu/m0ocq10bXP7sS/?=带有$overview[0]->subject; in imap_fetch_overview function . imap_fetch_overview函数中。

How to change the subject info of Gmail into Chinese character? 如何将Gmail的主题信息更改为中文字符?

Your string is a MIME RFC 2047 encoded word which can be decoded using PHP's mb_decode_mimeheader and mb_internal_encoding functions. 您的字符串是MIME RFC 2047编码的单词,可以使用PHP的mb_decode_mimeheadermb_internal_encoding函数进行解码。

To convert your MIME encoded string to UTF-8, you can use the following code: 要将您的MIME编码的字符串转换为UTF-8,可以使用以下代码:

mb_internal_encoding('UTF-8');
echo mb_decode_mimeheader('=?GB2312?B?zbO8xtGnu/m0ocq10bXP7sS/?=');
# result: 统计学基础实训项目

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM