GNOME Bugzilla – Bug 332140
Can't open the mail soffice attachment whoes filename contains localized characters.
Last modified: 2013-09-13 00:48:27 UTC
Please describe the problem: When received mail attachment contains localized filename, such as chinese, sometimes evolution can't open it. Steps to reproduce: 1. 2. 3. 1.Launch evolution on Solaris zh_cn.GB18030 locale 2.Generate a staroffice file. 3.use thunderbird to send a mail that attaches above staroffice file. 4.use evolution to receive the mail, open the attachment bar box, then double-click attachment to try to open; Actual results: Staroffice 7 pop up a message box, saying "Error loading document ...." Expected results: Open the staroffice file properly. Does this happen every time? Yes. Other information:
Created attachment 59912 [details] one sample message Can't open attachment on Solaris, but works fine after saving it.
There's the same issue with calander attachment bar.
could be a bit related to bug 311482
After looking into code, this bug is a bit different from bug 311482. #311482 is caused by not specifying name encoding correctly when getting attachment list. And this one might be resulted from not transfering filename from utf-8 to glib encoding when saving tempary attachment.
If filename is generated by e_filename_make_safe() or similar functions, it should be transfered from UTF-8 to glib encoding before really saving files. There're several places need to change as below. e-attachment-bar.c: temp_save_part() em-utils.c: em_utils_temp_save_part() e-cal-popup.c: temp_save_part() comp-edit.c: get_attachment_list()
Created attachment 60300 [details] [review] transfer filenames from UTF-8 to glib encoding before really saving files.
Created attachment 60382 [details] [review] [Calendar]transfer filenames from UTF-8 to glib encoding before really saving files.
Created attachment 60383 [details] [review] [Mailer]transfer filenames from UTF-8 to glib encoding before really saving files.
Created attachment 60384 [details] [review] [widgets]transfer filenames from UTF-8 to glib encoding before really saving files.
Committed all the patches to CVS HEAD.