From 25ea76f3a782b2cd0a9ed65216203b7d7472ef57 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 20 Jul 2001 00:08:50 +0000 Subject: Convert to the iconv-friendly charset names. 2001-07-19 Jeffrey Stedfast * camel-mime-filter-charset.c (camel_mime_filter_charset_new_convert): Convert to the iconv-friendly charset names. * providers/imap/camel-imap-store.c (create_folder): Fixed a compiler warning about returning without a value in a non-void function. Blah. * camel-mime-part.c (process_header): Pass the locale charset as the default_charset to header_decode_string(). * camel-folder-summary.c (camel_folder_summary_format_string): Pass the locale charset as the default_charset to header_decode_string(). (content_info_new): Same. * camel-mime-message.c (process_header): Pass the locale charset as the default_charset to header_decode_string(). * camel-mime-utils.c (append_8bit): New helper function who's purpose is similar to append_latin1() but for 8bit text that we are assuming is not latin1. (header_decode_text): Now takes a default_charset parameter and calls append_8bit when appropriate. (header_decode_string): Also takes a default_charset parameter now. (header_decode_mailbox): Pass NULL as the default_charset to header_decode_string(). svn path=/trunk/; revision=11250 --- camel/camel-folder-summary.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'camel/camel-folder-summary.c') diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c index 120d927766..ac525dd619 100644 --- a/camel/camel-folder-summary.c +++ b/camel/camel-folder-summary.c @@ -1375,15 +1375,16 @@ camel_folder_summary_format_address(struct _header_raw *h, const char *name) } char * -camel_folder_summary_format_string(struct _header_raw *h, const char *name) +camel_folder_summary_format_string (struct _header_raw *h, const char *name) { - const char *text; - - text = header_raw_find(&h, name, NULL); + const char *charset, *text; + + text = header_raw_find (&h, name, NULL); if (text) { - while (isspace(*text)) + while (isspace ((unsigned) *text)) text++; - return header_decode_string(text); + charset = camel_charset_locale_name (); + return header_decode_string (text, charset); } else { return NULL; } @@ -1695,16 +1696,18 @@ message_info_free(CamelFolderSummary *s, CamelMessageInfo *mi) } static CamelMessageContentInfo * -content_info_new(CamelFolderSummary *s, struct _header_raw *h) +content_info_new (CamelFolderSummary *s, struct _header_raw *h) { CamelMessageContentInfo *ci; - - ci = camel_folder_summary_content_info_new(s); - - ci->id = header_msgid_decode(header_raw_find(&h, "content-id", NULL)); - ci->description = header_decode_string(header_raw_find(&h, "content-description", NULL)); - ci->encoding = header_content_encoding_decode(header_raw_find(&h, "content-transfer-encoding", NULL)); - + const char *charset; + + ci = camel_folder_summary_content_info_new (s); + + charset = camel_charset_locale_name (); + ci->id = header_msgid_decode (header_raw_find (&h, "content-id", NULL)); + ci->description = header_decode_string (header_raw_find (&h, "content-description", NULL), NULL); + ci->encoding = header_content_encoding_decode (header_raw_find (&h, "content-transfer-encoding", NULL)); + return ci; } -- cgit v1.2.3