mailio
mailio copied to clipboard
IMAP list folder, encoding error ?
vcpkg: mailio[core]:x64-windows-static -> 0.21.0#2
code:
mailio::imap conn("xxx", 143);
conn.authenticate("admin", "xxx", mailio::imap::auth_method_t::LOGIN);
mailio::imap::mailbox_folder_t fld = conn.list_folders("");
print_folders(0, fld);
mail server: WinMail this result is cant reader, my inbox has chinese char result:
INBOX
&V4NXPg-
AZ
AZ_&TgtTVQ-
AZ_&U9GNJw-
AZ_&UKxrPg-
AZ_&XAFT9w-
AZ_&Y9CNJw-
AZ_&e35lNg-
AZ_&e35lNngB-
BS_&UWVekw-
BS_&VAhedg-
BS_&Y9CNJw-
SF_&UWVekw-
SF_&Y9CNJw-
ZZ_&UWVekw-
E-invoice
ECS
&WSl,,E6R-
EM
MAIL
VFEMAIL
HKA
HKA_&U9GNJw-
This just deal with the transferring but not content of character coding. Problem of which should be your reader.
So, your folders on the IMAP server have non-Latin characters and listing them throws an error?
So, your folders on the IMAP server have non-Latin characters and listing them throws an error?
Yes, the server contains simplified Chinese and traditional Chinese, they can be displayed normally, javax.mail. It also works
It is the feature I have never tested. Let me try it. Maybe I can easily add it as a new feature.
Looking forward to your updates
It doesn't look like any coding, how should i handle that it should be Chinese characters
The character coding should be automatically recognized by your reader from MIME.
The character coding should be automatically recognized by your reader from MIME.
你知道怎么解决吗
IMAP folders may be UTF7 encoded which is not currently supported by mailio. Thus, it is not a bug but the missing feature.
IMAP folders may be UTF7 encoded which is not currently supported by mailio. Thus, it is not a bug but the missing feature.
Hello, I have two questions. First, do you have plans to add this feature? Second, are you Chinese? (I'm Chinease)
I would have to check for a UTF-7 encoding C++ library, does it exist with MIT license or I should create such utility. Also, I need to see whether UTF-8 is also being used for this purposes. So, right now I do not have the straight-forward answer to your question. Regarding the nationality - I am not Chinese.
Thank you, I will try the method you mentioned in the future.