After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 673563 - Encoded filename for Outlook broken by spaces
Encoded filename for Outlook broken by spaces
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Mailer
3.2.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2012-04-05 11:42 UTC by Milan Crha
Modified: 2012-04-06 12:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
eds patch (2.27 KB, patch)
2012-04-05 11:48 UTC, Milan Crha
committed Details | Review

Description Milan Crha 2012-04-05 11:42:11 UTC
Moving this from a downstream bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=803991

This was initially reported against evolution-mapi, that filename which included UTF-8 letters is encoded in a way which evolution cannot read. After quite some investigation we figured out that the issue is with Edit->Preferences->Composer Preferences->Encode filenames in an Outlook/GMail way. Where there is a filename like "FIS Direct_ДБО_2012.pdf" then
a) without the option being checked evolution encodes it as
> Content-Disposition: attachment;
>     filename*=UTF-8''FIS%20Direct_%D0%94%D0%91%D0%9E_2012.pdf
   which it can read without any issue.
b) with the option being checked evolution encodes the file name as
> Content-Disposition: attachment;
>    filename="FIS =?UTF-8?Q?Direct=5F=D0=94=D0=91=D0=9E=5F2012=2Epdf?="
   and the worse, it cannot read it itself, and shows it in this form in UI.
 The interesting part is that the current GMail (as of today) doesn't have any issue with either format of these (thus it finally supports encoding as it should be), only evolution itself is confused with header value it created itself.

I realized that the problem is the space in the file name, which breaks header value into two words. While evolution is doing it right, it doesn't try to decode multiword value from encoding described by RFC 2047 in header parameters (it is not supposed to be there, as this was just a workaround for filenames in headers from times when outlook and gmail had problem with correct formatting). Having filename one single word fixes the issue for all involved. (I tested with GMail only, but I suppose older Outlook will be fine too).
Comment 1 Milan Crha 2012-04-05 11:48:51 UTC
Created attachment 211367 [details] [review]
eds patch

for evolution-data-server;

This patch includes also white-spaces in the encoded file name with the option to encode file names for Outlook/GMail, thus also evolution can recognize this encoding and show file name correctly to the user.
Comment 2 Milan Crha 2012-04-05 11:52:59 UTC
Created commit 87399d1 in eds master (3.5.1+)
Created commit 7bd9d7d in eds gnome-3-4 (3.4.1+)
Comment 3 Mikhail 2012-04-06 09:02:27 UTC
I'm wondering why on evolution-ews this problem was not spreaded.
Comment 4 Milan Crha 2012-04-06 12:20:02 UTC
Evolution-mapi generates MIME messages from MAPI properties, while evolution-ews receives MIME messages constructed by the server. And the option in preferences influences any message creation, not only when sending.