imapclient icon indicating copy to clipboard operation
imapclient copied to clipboard

subject search chinese not support?

Open pql-eternally opened this issue 2 years ago • 5 comments

我使用IMAPClient版本是3.0.0,我使用下面按中文搜索主题时不生效且底层会报错。 client.search(['SUBJECT', '每日信用管家'], charset='UTF-8') image

pql-eternally avatar Nov 09 '23 11:11 pql-eternally

I also encountered the same problem

image

python3.8/site-packages/imapclient/imapclient.py

zhangjiale2020 avatar Nov 09 '23 11:11 zhangjiale2020

server.search(['SUBJECT', '中国乡村'], charset='UTF-8')

zhangjiale2020 avatar Nov 09 '23 11:11 zhangjiale2020

This looks like a bug in _send_literal. It should be calling the has_capability method instead of assuming cached_capabilities has been populated.

A workaround would be to call the capabilities method after login. That will ensure the cached capabilities are set.

I will work on a proper fix.

mjs avatar Nov 25 '23 02:11 mjs