Re: Mailbox in UTF-8
RW <[email protected]> Sun, 8 Nov 2020 16:09:55 +0000
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 8 Nov 2020 13:49:15 +0100 Geert Stappers wrote: > On 07-11-2020 06:47, Jan Štembera wrote: > > is possilble to add function to list all mailboxes on the server? > > From that will be possible to write to the configuration the names > > of mailboxes. > > > > Or the encoding table UTF-8 to your encoding of name of mailbox? > > Python3 does UTF-8 by default. In the IMAP protocol folder names are always passed over the network in a modified version of UTF-7 (mUTF-7). This encoding uses only ASCII compatible bytes. I don't know what getmail 5 and 6 do internally, but there's more than one way it might be done. It could store the names as mUTF-7 ASCII strings. It could store them in a more conventional encoding, such as UTF-8, and convert to mUTF-7 as necessary.