-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] 关于首页文档中,getMailboxes()方法,邮箱里中文文件夹会返回乱码的一些疑问 #339
Comments
I've changed / fixed this as suggested by you. See above referenced commit. It seems to work with any kind of characters. This change will be included in the next release. |
QQ邮箱解码有问题 php-imap/src/PhpImap/Mailbox.php Line 513 in 94107fd
修改: |
None of these solutions mentioned above solved this issue. Folders encoding is ASCII for all folders and detect encoding or any other mentioned operation does not return localized gmail folder name. So I have went through Group Office I use as main project and the custom decoder works like a charm.
|
@michalcharvat I would appreciate, if you could open a pull request with this change / fix. :) |
…described in description
先说说我遇到的问题
我想获取邮箱中其他文件夹下的邮件,然后我找到了你在首页说明文档的例子,就是这个:
然后我调试的时候,发现在这个返回的结果中,邮箱里面带中文名称的文件夹中文部分全部都显示乱码,类似这样的
{xxxxxxxxx:993/imap/ssl/novalidate-cert}Jira&kBp35Q-" => []
,如果是英文名称就没有问题。后来查了下源码,发现其中关于名称解析这一部分,没有进行转码,大致像下面这样
我加了这个
decodeStringFromUtf7ImapToUtf8()
这个转码方法后,获取的内容就展示正常了,类似这样:"{xxxxxxxxx:993/imap/ssl/novalidate-cert}Jira通知" => array:24 [▶]
之后又看到了这个方法
getListingFolders()
,这个方法里面是做了decodeStringFromUtf7ImapToUtf8()
转码操作的;通过这个方法获取的邮箱文件夹列表中文名称是显示正常的。有点疑问,就是
getMailboxes
这个方法为啥没有进行转码操作?The text was updated successfully, but these errors were encountered: