aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-12-21 20:38:11 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-12-21 20:38:11 +0800
commitce934e0f6bd56288f13e10099abf7bdbc8bb50e0 (patch)
tree64410f66a1efa374afc87673f6a805a3313247b4
parent752f32f7dbd4d99f159abdd591e164cf00741b0d (diff)
downloadgsoc2013-evolution-ce934e0f6bd56288f13e10099abf7bdbc8bb50e0.tar.gz
gsoc2013-evolution-ce934e0f6bd56288f13e10099abf7bdbc8bb50e0.tar.zst
gsoc2013-evolution-ce934e0f6bd56288f13e10099abf7bdbc8bb50e0.zip
fixes #274433
svn path=/trunk/; revision=30920
-rw-r--r--plugins/mail-to-task/ChangeLog7
-rw-r--r--plugins/mail-to-task/mail-to-task.c18
2 files changed, 23 insertions, 2 deletions
diff --git a/plugins/mail-to-task/ChangeLog b/plugins/mail-to-task/ChangeLog
index 705ba4a4d2..d6005138c0 100644
--- a/plugins/mail-to-task/ChangeLog
+++ b/plugins/mail-to-task/ChangeLog
@@ -1,3 +1,10 @@
+2005-12-21 Chenthill Palanisamy <pchenthill@novell.com>
+
+ Committing for Hiroyuki Ikezoe <poincare@ikezoe.net>
+
+ Fixes #274433
+ * mail-to-task.c: (set_description): Convert the string to utf8.
+
2005-10-11 Mubeen Jukaku <jmubeen@novell.com>
* mail-to-task.c (set_attendees): Re-implemented this funciton.
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c
index ba277fc7a8..b22f766811 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -77,7 +77,8 @@ set_description (ECalComponent *comp, CamelMimeMessage *message)
CamelStream *mem;
ECalComponentText text;
GSList sl;
- char *str;
+ char *str, *convert_str = NULL;
+ int bytes_read, bytes_written;
content = camel_medium_get_content_object ((CamelMedium *) message);
if (!content)
@@ -89,7 +90,18 @@ set_description (ECalComponent *comp, CamelMimeMessage *message)
str = g_strndup (((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len);
camel_object_unref (mem);
- text.value = str;
+ /* convert to UTF-8 string */
+ if (str && content->mime_type->params->value)
+ {
+ convert_str = g_convert (str, strlen (str),
+ "UTF-8", content->mime_type->params->value,
+ &bytes_read, &bytes_written, NULL);
+ }
+
+ if (convert_str)
+ text.value = convert_str;
+ else
+ text.value = str;
text.altrep = NULL;
sl.next = NULL;
sl.data = &text;
@@ -97,6 +109,8 @@ set_description (ECalComponent *comp, CamelMimeMessage *message)
e_cal_component_set_description_list (comp, &sl);
g_free (str);
+ if (convert_str)
+ g_free (convert_str);
}
static void