I am working with QSslSocket to get Gmail emails. I want to check all folders in server:
QSslSocket::write("tag LIST \"\" \"*\"");
QSslSocket::write("tag LIST \"\" \"*\"");
To copy to clipboard, switch view to plain text mode
The output is:
* LIST (\HasChildren) "/" "INBOX"
* LIST (\HasNoChildren) "/" "INBOX/Test1"
* LIST (\HasNoChildren) "/" "INBOX/Test2"
* LIST (\Noselect \HasChildren) "/" "[Gmail]"
* LIST (\HasNoChildren \All) "/" "[Gmail]/Alle Nachrichten"
* LIST (\HasNoChildren \Drafts) "/" "[Gmail]/Entw&APw-rfe"
* LIST (\HasNoChildren \Sent) "/" "[Gmail]/Gesendet"
* LIST (\HasNoChildren \Flagged) "/" "[Gmail]/Markiert"
* LIST (\HasChildren \Trash) "/" "[Gmail]/Papierkorb"
* LIST (\HasChildren) "/" "INBOX"
* LIST (\HasNoChildren) "/" "INBOX/Test1"
* LIST (\HasNoChildren) "/" "INBOX/Test2"
* LIST (\Noselect \HasChildren) "/" "[Gmail]"
* LIST (\HasNoChildren \All) "/" "[Gmail]/Alle Nachrichten"
* LIST (\HasNoChildren \Drafts) "/" "[Gmail]/Entw&APw-rfe"
* LIST (\HasNoChildren \Sent) "/" "[Gmail]/Gesendet"
* LIST (\HasNoChildren \Flagged) "/" "[Gmail]/Markiert"
* LIST (\HasChildren \Trash) "/" "[Gmail]/Papierkorb"
To copy to clipboard, switch view to plain text mode
Then I want to select one of those folder, I select INBOX folder for example:
QSslSocket::write("tag SELECT INBOX");
QSslSocket::write("tag SELECT INBOX");
To copy to clipboard, switch view to plain text mode
It works fine, but when I select folder "[Gmail]/Entw&APw-rfe", it does not work anymore. I think the problem is the encoding of text "Entw&APw-rfe" (in unicode is "Entwürfe"). So how can I get exactly the name of the folder in unicode and input it in command? Does Qt have a library to process this?
Thanks for help!
Bookmarks