IMAP URL problems

Ewald Dieterich ewald.dieterich at
Wed May 5 17:22:25 EDT 2004

I experience some problems with imapurl_toURL() and imapurl_fromURL()
from lib/imapurl.c when I use mailbox names with non-ASCII

Here is a test program:

int main(void)
    char server[100] = "server";
    char mailbox[100] = "&AOQ- &AMQ-";  /* "ä Ä" */
    char url[100];

    imapurl_toURL(url, server, mailbox, 0);
    imapurl_fromURL(server, mailbox, url);

    return 0;

And here is the output:

&AOQ- &QAxA-

I guess the two strings should be the same (and they are the same for
other mailbox names, e.g. "AOQAxA-" aka "äÄ").

Does anybody know how to fix this?

I think the error is in imapurl_fromURL() because the hex values in
the IMAP URL ("imap://server/%C3%A4%20%C3%84") look okay if you
compare them to the hex values of "ä Ä" converted to UTF-8:

$ echo -n "ä Ä" | recode iso88591..utf8 | hexdump -C
00000000  c3 a4 20 c3 84                                    |ä Ã.|

Cyrus Home Page:
Cyrus Wiki/FAQ:
List Archives/Info:

More information about the Info-cyrus mailing list