[GH-ISSUE #105] [Bug] IMAP folder names in non-latin script garbled #92

Closed
opened 2026-03-03 01:19:44 +03:00 by kerem · 5 comments
Owner

Originally created by @krackout on GitHub (Aug 1, 2022).
Original GitHub issue: https://github.com/d99kris/nmail/issues/105

Originally assigned to: @d99kris on GitHub.

Since I'm very happy with nmail I started using it for my business e-mail account also. The company I work for uses office365 with IMAP enabled thankfully. The locale is Greek, which is used for IMAP folder names also. Perhaps switching locale from office365 web interface settings (for display language) would change folder names also - not sure about it. But I'm posting here first, in case it's easily solvable.

The issue is: The IMAP folder names in non-latin script are garbled, at least for Greek. I don't know if IMAP folder names are encoded in Unicode, or 8-bit ISO8859-7 / Win1253 and if it's vendor/imap server dependent.

For example,
Απεσταλμένα is shown as &A5EDwAO1A8MDxAOxA7sDvAOtA70DsQ-
nmail

Originally created by @krackout on GitHub (Aug 1, 2022). Original GitHub issue: https://github.com/d99kris/nmail/issues/105 Originally assigned to: @d99kris on GitHub. Since I'm very happy with `nmail` I started using it for my business e-mail account also. The company I work for uses office365 with IMAP enabled thankfully. The locale is Greek, which is used for IMAP folder names also. Perhaps switching locale from office365 web interface settings (for display language) would change folder names also - not sure about it. But I'm posting here first, in case it's easily solvable. The issue is: The IMAP folder names in non-latin script are garbled, at least for Greek. I don't know if IMAP folder names are encoded in Unicode, or 8-bit ISO8859-7 / Win1253 and if it's vendor/imap server dependent. For example, `Απεσταλμένα` is shown as `&A5EDwAO1A8MDxAOxA7sDvAOtA70DsQ-` ![nmail](https://user-images.githubusercontent.com/36501063/182083182-c06c790f-18fe-464e-b21a-37749b6ea0c3.png)
kerem closed this issue 2026-03-03 01:19:44 +03:00
Author
Owner

@d99kris commented on GitHub (Aug 1, 2022):

Hi @krackout - thanks for reporting! I can reproduce it here too, by creating IMAP folders with non-ASCII characters. Apparently it's a form of custom UTF-7 encoding, standardized for IMAP folder name use.

It's a bug in nmail so I'll look into fixing it.

<!-- gh-comment-id:1201170257 --> @d99kris commented on GitHub (Aug 1, 2022): Hi @krackout - thanks for reporting! I can reproduce it here too, by creating IMAP folders with non-ASCII characters. Apparently it's a form of custom UTF-7 encoding, standardized for IMAP folder name use. It's a bug in `nmail` so I'll look into fixing it.
Author
Owner

@krackout commented on GitHub (Aug 1, 2022):

Great, thank you! A point to mention, on main.conf file, will it be possible to have a directive like for example, sent=Απεσταλμένα ? I'm wondering, because I edit main.conf file as UTF-8, whilst as per your discovery, IMAP folder names are custom UTF-7 encoding.

<!-- gh-comment-id:1201228469 --> @krackout commented on GitHub (Aug 1, 2022): Great, thank you! A point to mention, on `main.conf` file, will it be possible to have a directive like for example, `sent=Απεσταλμένα` ? I'm wondering, because I edit `main.conf` file as UTF-8, whilst as per your discovery, IMAP folder names are custom UTF-7 encoding.
Author
Owner

@d99kris commented on GitHub (Aug 1, 2022):

It's a good thing you mentioned this, it should work - the conf files are all treated as UTF-8, but I'll make sure to test this as part of the fix.

<!-- gh-comment-id:1201291063 --> @d99kris commented on GitHub (Aug 1, 2022): It's a good thing you mentioned this, it should work - the conf files are all treated as UTF-8, but I'll make sure to test this as part of the fix.
Author
Owner

@d99kris commented on GitHub (Aug 6, 2022):

This should be fixed with above commit. Please let me know if you're still encountering any issues.

<!-- gh-comment-id:1207216230 --> @d99kris commented on GitHub (Aug 6, 2022): This should be fixed with above commit. Please let me know if you're still encountering any issues.
Author
Owner

@krackout commented on GitHub (Aug 7, 2022):

It's fixed. Working fine, proper list of IMAP folders in Greek and directives as sent=Απεσταλμένα also. Thank you!

<!-- gh-comment-id:1207344469 --> @krackout commented on GitHub (Aug 7, 2022): It's fixed. Working fine, proper list of IMAP folders in Greek and directives as `sent=Απεσταλμένα` also. Thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nmail#92
No description provided.