diff options
author | Kevin McCarthy <kevin@8t8.us> | 2014-07-17 16:05:47 +0200 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2014-07-17 16:05:47 +0200 |
commit | fc83cb64135c949383881bcb9600f4cc9d9e58fe (patch) | |
tree | 5eccbf7d57c9d6d934a1dde2193f72d1755f31be /imap/browse.c | |
parent | ff4f1ca19a75640165caf9c2f16f7d07bc139d5b (diff) |
Add support for utf-8 mailboxes in imap.
This adds support for RFC6855 to imap/*.c.
Thanks to Arnt Gulbrandsen for the original patch.
Diffstat (limited to 'imap/browse.c')
-rw-r--r-- | imap/browse.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/imap/browse.c b/imap/browse.c index 8b60bc78..2cd091dd 100644 --- a/imap/browse.c +++ b/imap/browse.c @@ -75,7 +75,7 @@ int imap_browse (char* path, struct browser_state* state) char *ptr; imap_fix_path (idata, mx.mbox, mbox, sizeof (mbox)); ptr = safe_strdup (mbox); - imap_utf7_encode (&ptr); + imap_utf_encode (idata, &ptr); mbox[sizeof (mbox) - 1] = '\0'; strncpy (mbox, ptr, sizeof (mbox) - 1); FREE (&ptr); @@ -400,11 +400,14 @@ static void imap_add_folder (char delim, char *folder, int noselect, char tmp[LONG_STRING]; char relpath[LONG_STRING]; IMAP_MBOX mx; + IMAP_DATA* idata; if (imap_parse_path (state->folder, &mx)) return; + if (!(idata = imap_conn_find (&(mx.account), 0))) + return; - imap_unmunge_mbox_name (folder); + imap_unmunge_mbox_name (idata, folder); if (state->entrylen + 1 == state->entrymax) { |