Skip to content
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

IMAP list folder, encoding error ? #132

Open
YZJClear opened this issue Jul 2, 2023 · 12 comments
Open

IMAP list folder, encoding error ? #132

YZJClear opened this issue Jul 2, 2023 · 12 comments

Comments

@YZJClear
Copy link

YZJClear commented Jul 2, 2023

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-


@tsurumi-yizhou
Copy link
Contributor

This just deal with the transferring but not content of character coding. Problem of which should be your reader.

@karastojko
Copy link
Owner

So, your folders on the IMAP server have non-Latin characters and listing them throws an error?

@YZJClear
Copy link
Author

YZJClear commented Jul 5, 2023

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

@karastojko
Copy link
Owner

It is the feature I have never tested. Let me try it. Maybe I can easily add it as a new feature.

@YZJClear
Copy link
Author

YZJClear commented Jul 5, 2023

Looking forward to your updates

@YZJClear
Copy link
Author

YZJClear commented Jul 6, 2023

image
It doesn't look like any coding, how should i handle that it should be Chinese characters

@tsurumi-yizhou
Copy link
Contributor

The character coding should be automatically recognized by your reader from MIME.

@YZJClear
Copy link
Author

The character coding should be automatically recognized by your reader from MIME.

你知道怎么解决吗

@karastojko
Copy link
Owner

IMAP folders may be UTF7 encoded which is not currently supported by mailio. Thus, it is not a bug but the missing feature.

@YZJClear
Copy link
Author

YZJClear commented Nov 7, 2023

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)

@karastojko
Copy link
Owner

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.

@YZJClear
Copy link
Author

Thank you, I will try the method you mentioned in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants