aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/comp-editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/dialogs/comp-editor.c')
-rw-r--r--calendar/gui/dialogs/comp-editor.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index cc19b006f8..f6fa0e9730 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -634,7 +634,7 @@ get_attachment_list (CompEditor *editor)
CamelDataWrapper *wrapper;
CamelStream *stream;
char *attach_file_url;
- char *safe_fname;
+ char *safe_fname, *utf8_safe_fname;
char *filename;
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (p->data));
@@ -642,7 +642,9 @@ get_attachment_list (CompEditor *editor)
/* Extract the content from the stream and write it down
* as a mime part file into the directory denoting the
* calendar source */
- safe_fname = camel_file_util_safe_filename(camel_mime_part_get_filename ((CamelMimePart *)p->data));
+ utf8_safe_fname = camel_file_util_safe_filename (camel_mime_part_get_filename ((CamelMimePart *) p->data));
+ safe_fname = g_filename_from_utf8 ((const char *) utf8_safe_fname, -1, NULL, NULL, NULL);
+ g_free (utf8_safe_fname);
filename = g_strdup_printf ("%s-%s", comp_uid, safe_fname);