On Fri, 2004-12-24 at 15:26 +0900, Kazuo Moriwaka wrote:
2 calls of charset_to_ucase_utf8_string() is caused by commands like following: a001 search charset ***** body "*****"
When imapd receive it, it calls message_body_search()
Call flow is look like:
message_body_search() +-> message_body_search_init() | +-> charset_to_ucase_utf8_string() <-- 1st (key is 'charset') +-> message_bodd_search_ctx() +-> message_search_header() +-> message_header_search_init() +-> charset_to_ucase_utf8_string() <-- 2nd (key is utf-8)
This happens only when it's searching MIME part headers, so it shouldn't affect the actual body searching? I did several tests and looks like it all works, except that one. I used this patch: --- lib-mail/message-body-search.c 20 Dec 2004 12:51:18 -0000 1.21 +++ lib-mail/message-body-search.c 6 Jan 2005 21:39:27 -0000 @@ -109,8 +109,7 @@ hdr_search_ctx = message_header_search_init(pool_datastack_create(), ctx->body_ctx->key, - ctx->body_ctx->charset, - NULL); + "UTF-8", NULL); if (hdr_search_ctx == NULL) { /* Invalid key. */ return FALSE;