aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-utils.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-03-21 00:43:29 +0800
committerDan Winship <danw@src.gnome.org>2003-03-21 00:43:29 +0800
commitbecf944b42e72175079e9b975ab631e9adc91b43 (patch)
treeafaa5e3960f576cc653e6d095fc5420dcdf12664 /camel/camel-mime-utils.c
parent1bef6b2b8cd335f167deb690160c8fb9d4f06dd0 (diff)
downloadgsoc2013-evolution-becf944b42e72175079e9b975ab631e9adc91b43.tar.gz
gsoc2013-evolution-becf944b42e72175079e9b975ab631e9adc91b43.tar.zst
gsoc2013-evolution-becf944b42e72175079e9b975ab631e9adc91b43.zip
Handle raw 8-bit From data "correctly". (The same way we handle
raw 8-bit Subject data.) * camel-mime-utils.c (header_decode_mailbox): Take a charset arg and pass it to header_decode_string. (header_decode_address): Take a charset arg and pass it to header_decode_mailbox. (header_mailbox_decode): Likewise. (header_address_decode): Take a charset arg and pass it to header_decode_address. * camel-folder-summary.c (summary_format_address): Take a charset arg and pass to header_address_decode. (message_info_new, camel_message_info_new_from_header): Pass charset to summary_format_address * camel-internet-address.c (internet_decode): Update for header_address_decode change. (Unfortunately we don't have a charset to pass here.) * camel-mime-message.c (camel_mime_message_build_mbox_from): Move this here from camel-mbox-summary since the same functionality is needed by evolution-mail too (and update for header_address_decode change) * providers/local/camel-mbox-summary.c (camel_mbox_summary_build_from): Moved to CamelMimeMessage svn path=/trunk/; revision=20430
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r--camel/camel-mime-utils.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 64f28a254f..04fa0e6f90 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -2334,7 +2334,7 @@ header_decode_addrspec(const char **in)
*/
static struct _header_address *
-header_decode_mailbox(const char **in)
+header_decode_mailbox(const char **in, const char *charset)
{
const char *inptr = *in;
char *pre;
@@ -2356,7 +2356,7 @@ header_decode_mailbox(const char **in)
char *text, *last;
/* perform internationalised decoding, and append */
- text = header_decode_string (pre, NULL);
+ text = header_decode_string (pre, charset);
g_string_append (name, text);
last = pre;
g_free(text);
@@ -2458,7 +2458,7 @@ header_decode_mailbox(const char **in)
g_string_append_c(addr, *inptr);
/* check for address is encoded word ... */
- text = header_decode_string(addr->str, NULL);
+ text = header_decode_string(addr->str, charset);
if (name == NULL) {
name = addr;
addr = g_string_new("");
@@ -2514,7 +2514,7 @@ header_decode_mailbox(const char **in)
if (comend > comstart) {
d(printf(" looking at subset '%.*s'\n", comend-comstart, comstart));
tmp = g_strndup (comstart, comend-comstart);
- text = header_decode_string (tmp, NULL);
+ text = header_decode_string (tmp, charset);
name = g_string_new (text);
g_free (tmp);
g_free (text);
@@ -2537,7 +2537,7 @@ header_decode_mailbox(const char **in)
}
static struct _header_address *
-header_decode_address(const char **in)
+header_decode_address(const char **in, const char *charset)
{
const char *inptr = *in;
char *pre;
@@ -2562,7 +2562,7 @@ header_decode_address(const char **in)
if (*inptr != ';') {
int go = TRUE;
do {
- member = header_decode_mailbox(&inptr);
+ member = header_decode_mailbox(&inptr, charset);
if (member)
header_address_add_member(addr, member);
header_decode_lwsp(&inptr);
@@ -2581,7 +2581,7 @@ header_decode_address(const char **in)
}
*in = inptr;
} else {
- addr = header_decode_mailbox(in);
+ addr = header_decode_mailbox(in, charset);
}
g_string_free(group, TRUE);
@@ -2807,16 +2807,16 @@ header_references_dup(const struct _header_references *list)
}
struct _header_address *
-header_mailbox_decode(const char *in)
+header_mailbox_decode(const char *in, const char *charset)
{
if (in == NULL)
return NULL;
- return header_decode_mailbox(&in);
+ return header_decode_mailbox(&in, charset);
}
struct _header_address *
-header_address_decode(const char *in)
+header_address_decode(const char *in, const char *charset)
{
const char *inptr = in, *last;
struct _header_address *list = NULL, *addr;
@@ -2832,7 +2832,7 @@ header_address_decode(const char *in)
do {
last = inptr;
- addr = header_decode_address(&inptr);
+ addr = header_decode_address(&inptr, charset);
if (addr)
header_address_list_append(&list, addr);
header_decode_lwsp(&inptr);