ASCII 字符而不是瑞典语字符?
我已经测试了 PHP 的 IMAP 库。从 GMAIL 帐户获取电子邮件,但我无法集中精力尝试使字符正确显示。
起初,当我意识到我不小心获取了附件而不是邮件正文时,我几乎要抓狂了 - 不好,但现在当这个问题解决后,我仍然无法使用适当的瑞典字符查看实际邮件,例如åÅ ää öÖ
显示为它们的 ASCII 近亲; =E4、=E5
- 等等。
解决这个问题的适当方法是什么?我已经测试了我自己能想到的所有编码功能 - 但它不起作用......
谢谢!
I have tested PHP's IMAP lib. to fetch emails from a GMAIL account, but I've just can't get my head around trying to make the characters to display correctly.
At first, I was close to pull my hair off when I realized that I accidentally fetched the attachments instead of the message body - not good, but now when that is solved, I still have problems viewing the actual messages with appropriate Swedish characters, like åÅ äÄ öÖ
which instead appear as their ASCII-cousins; =E4, =E5
- and so on.
What is the appropriate way to solve this? I've tested all encoding functions that I can think of by myself - and it won't work...
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不是 100% 确定,但在我看来,消息的内容是引用可打印编码的。尝试
quoted_printable_decode
- http:// www.php.net/manual/en/function.quoted-printable-decode.php如果您已经在使用 IMAP 扩展,您还可以尝试
imap_qprint
- http://www.php.net/manual/en/function.imap-qprint.phpNot 100% sure, but it seems to me that the content of the message is quoted-printable encoded. Try
quoted_printable_decode
- http://www.php.net/manual/en/function.quoted-printable-decode.phpIf you are already using the IMAP extension, you can also try
imap_qprint
- http://www.php.net/manual/en/function.imap-qprint.php试试这个
Try this