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 524377 - Attachments with localised letters are unrecognised by Outlook
Attachments with localised letters are unrecognised by Outlook
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.22.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 339415 517893 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-03-25 20:50 UTC by C de-Avillez
Modified: 2011-10-13 07:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Appearance of non-asci attachment names in Gmail (30.27 KB, image/png)
2008-07-08 06:54 UTC, Janberk Sahin
  Details
proposed eds patch (2.94 KB, patch)
2008-11-03 19:25 UTC, Milan Crha
none Details | Review
proposed eds patch ][ (4.08 KB, patch)
2008-11-07 22:55 UTC, Milan Crha
none Details | Review
tar containing file that does not encode properly (10.00 KB, application/x-tar)
2008-11-10 18:33 UTC, C de-Avillez
  Details
proposed eds patch ]I[ (4.02 KB, patch)
2008-11-10 22:35 UTC, Milan Crha
committed Details | Review
proposed evo patch (6.09 KB, patch)
2008-11-10 22:37 UTC, Milan Crha
committed Details | Review

Description C de-Avillez 2008-03-25 20:50:33 UTC
Original Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/205999

From original description:

"effenberg@effenberg-mobile:~$ uname -a
Linux effenberg-mobile 2.6.24-12-generic #1 SMP Wed Mar 12 23:01:54 UTC 2008 i686 GNU/Linux
effenberg@effenberg-mobile:~$ evolution --version
GNOME evolution 2.22.0
effenberg@effenberg-mobile:~$

Attachments sent from Evolution to WIndows boxes using Outlook or Outlook Express are converted to ATT<number>.dat files, if the letter "ç" is used in the attached file name. This is fully reproducible here, in all our machines running fully updated Hardy. This problem persists for at least two weeks now.

-ç.xls, ç.doc, ç.ppt, ç.pdf, ç.gif, etc are received as ATT<number>.dat.
-c.xls, c.doc, c.ppt, c.pdf, c.gif, etc are received normally.

I have not extensively tested this with other letters peculiar of the Brazilian Portuguese language, such as áéíóú, à, ã, âêô and ü, but since it dosn't support "ç", there may be problems with using this letters too."

A quick test I did shows the attachments (I attached a text file named "ç.txt" will have the following MIME header:

--=-ceEJcbwlddnv14KpPBAQ
Content-Disposition: attachment; filename*=ISO-8859-1''%E7.txt
Content-Transfer-Encoding: base64
Content-Type: text/plain; name*=ISO-8859-1''%E7.txt; charset=ISO-8859-1

Evolution correctly identifies it, and shows the attachment correctly named. Outlook will show the attachment renamed to "AT<number>.DAT".

The reporter states this started to happen as he moved to Evo 2.22 (out of 2.21.9x), so this behaviour was probably introduced in between.

I am not sure how to address this, since I am not familiar with the conversion standard for localised strings.

But -- I am guessing -- this may affect a lot of the non-English users of Evo.
Comment 1 Milan Crha 2008-07-04 18:01:55 UTC
I do not think it's question of the recent version, I tried almost same thing with some old version of evolution, and outlook still doesn't understand the attachment names.

Then I tried to sent from outlook to Evo and both recognized it properly, maybe the evo part should follow same as that outlook does:
------=_NextPart_000_0005_01C8DE0F.F0BF3E40
Content-Type: text/plain; format=flowed; name="=?iso-8859-2?B?7Lno+L794e3pLnR4dA==?="; reply-type=original
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="=?iso-8859-2?B?7Lno+L794e3pLnR4dA==?="

but maybe not. Jeff, any idea on this thing?
Comment 2 Jeffrey Stedfast 2008-07-04 20:51:28 UTC
well, the way Outlook encodes the filename is strictly illegal and the way Evolution encodes them is the proper IETF defined encoding format as specified in rfc2184/2231

Evolution should not be made to break standards imho.
Comment 3 Milan Crha 2008-07-07 07:22:46 UTC
Thanks for pointing the RFC numbers. I agree Evolution should not break standards. I didn't check the code yet, but do you think it has some workaround for outlook attachments that it can read its name without any problem even it's not encoded in the standard way?
Comment 4 Jeffrey Stedfast 2008-07-07 13:26:14 UTC
sadly, there's probably no workaround other than maybe ascii'ifying the filenames.

E.g.: ç.doc -> c.doc

but that wouldn't be what the user would expect, so... 
Comment 5 C de-Avillez 2008-07-07 14:35:18 UTC
Milan, its the other way around: Evolution-sent attachments cannot be read by Outlook :-)

Jeff, I would be happy with ascii-fying the filenames, since this would produce an attachment that even Outlook would be able to swallow. The problem I see is how do we identify when the recipient is Outlook? We probably would not really like to send an ascii-ficated filename to everybody, just to cater for a product that is unable to follow standards.

In this case I would rather publish a warning somewhere, stating something like "Attention: if the recipient of the email is running Outlook, please do not use extended/nationalised characters for the attachment(s) filenames. Outlook will not be able to deal with it.".

(OT -- Man, I loved being able to transform ASCII! ascii-nisation sounds really cool :-)
Comment 6 Janberk Sahin 2008-07-08 06:54:08 UTC
Created attachment 114165 [details]
Appearance of non-asci attachment names in Gmail
Comment 7 Janberk Sahin 2008-07-08 06:54:47 UTC
Hi!

I guess it's not Outlook only, but Gmail also doesn't recognize non-ascii characters in attachment names. I created attachments with names ü.txt, ğ.txt, İ.txt, ı.txt, ş.txt, ç.txt, ö.txt, Turkish language characters. Attached is the appearance in Gmail when the attachments are sent from Evolution.

Hope it helps,
Janberk
Comment 8 Milan Crha 2008-07-14 13:46:39 UTC
Gmail also uses encoded-words in filename, even it should not, as is written in the above RFCs. To be honest, I tried with other of my email accounts and all of them do this same, none of them conforms the above RFCs, but uses encoded-word.
We also "support" the encoded words on the input, even it should not be there.

I agree with Jeff about following standards, but is this so important even in such place like the name/filename of Content-Type/Content-Disposition?
Comment 9 CooCoo 2008-10-25 18:57:09 UTC
Greet from China!

Does it means that Evolution will do nothing on this issue? Nor any workaround?

It is sad for me, who are looking for changing my work platform from Windows
to Linux. Since I cannot force my colleagues and friends to abandon Outlook.

I think it should be true that the RFC Evolution used is better than what Outlook used. But the law of Internet is the "de facto" standard weigh heavy than the "advanced" standard...

Could anyone tell me if there is an email client on Linux that can send a non-English filename attachment to Outlook?

Thank you!




(In reply to comment #2)
> well, the way Outlook encodes the filename is strictly illegal and the way
> Evolution encodes them is the proper IETF defined encoding format as specified
> in rfc2184/2231
> 
> Evolution should not be made to break standards imho.
> 

Comment 10 CooCoo 2008-10-25 19:17:01 UTC
I have just searched and found that Evolution used RFC 2231 as the 
Message Header standard, while Outlook used RFC2047.

Is that possible that Evolution add an option of RFC2047?


(In reply to comment #9)
> Greet from China!
> 
> Does it means that Evolution will do nothing on this issue? Nor any workaround?
> 
> It is sad for me, who are looking for changing my work platform from Windows
> to Linux. Since I cannot force my colleagues and friends to abandon Outlook.
> 
> I think it should be true that the RFC Evolution used is better than what
> Outlook used. But the law of Internet is the "de facto" standard weigh heavy
> than the "advanced" standard...
> 
> Could anyone tell me if there is an email client on Linux that can send a
> non-English filename attachment to Outlook?
> 
> Thank you!
> 
> 
> 
> 
> (In reply to comment #2)
> > well, the way Outlook encodes the filename is strictly illegal and the way
> > Evolution encodes them is the proper IETF defined encoding format as specified
> > in rfc2184/2231
> > 
> > Evolution should not be made to break standards imho.
> > 
> 

Comment 11 C de-Avillez 2008-10-29 23:21:20 UTC
It seems ASCIIfying the file names would not work, since this is affecting non-ASCII users (as reported on the Ubuntu bug). Also, an ASCII filename with spaces will trigger the bug. And yes, I realise we could replace the space by -- say -- an underscore.

But it really sounds better to make it compatible with the broken servers in the world (a lot of them, if I follow mchra).

@Janberk Sahin: what version of Evolution are you running?

Comment 12 Milan Crha 2008-11-03 19:25:40 UTC
Created attachment 121905 [details] [review]
proposed eds patch

for evolution-data-server;

Do not take me wrong, I do not like the change, but I want to support out users.
The change comes quite low in the code, thus no option available, I'm sorry.
Comment 13 Srinivasa Ragavan 2008-11-04 03:41:58 UTC
guys, can you confirm, if the patch works for you?
Comment 14 Milan Crha 2008-11-04 14:12:44 UTC
I just noticed it has some issues with spaces in the file name in Outlook, but it doesn't seem to be under our control, because the encoded filename in the mail source seems correct to me.
Comment 15 C de-Avillez 2008-11-04 15:38:08 UTC
I am building a test (PPA) package for Ubuntu Intrepid, and should have it available for the reporter and CC on UBuntu in a few.

Since they have been the most vocal on this bug, it makes sense to have it available for them to test. I will update here on the results.
Comment 16 C de-Avillez 2008-11-04 23:58:32 UTC
Milan, what is it you are changing here?

@@ -3322,7 +3330,7 @@ header_encode_param (const unsigned char
 	str = out->str;
 	g_string_free (out, FALSE);
 	*encoded = TRUE;
-	
+
 	return str;
 }
Comment 17 C de-Avillez 2008-11-05 01:33:12 UTC
test packages for Ubuntu Hardy and Intrepid have been put available. I will wait for feedback, and will post it here.
Comment 18 Milan Crha 2008-11-05 10:17:33 UTC
(In reply to comment #16)
> Milan, what is it you are changing here?

It's not visible, but it's there, the '-' line has \t, but the '+' line doesn't.
Comment 19 C de-Avillez 2008-11-06 18:14:16 UTC
First feedback from the Ubuntu bug:

"Hi Hggdh, I followed your instructions and updates Evolution with the
Hardy package.

ç.txt still is received by Outlook Express as ATTxxxxxx.dat...

The good news is that "this is a test.txt" was received properly!!"

I will ask the reporter for the MIME headers.
Comment 20 C de-Avillez 2008-11-07 02:09:28 UTC
New comments from the Ubuntu bug.

(cherry-picked the important pieces of the comments)
-------- start comments --------
--=-5hGpl2nVDtewDmbpAyxl
Content-Disposition: attachment; filename*=ISO-8859-1''a%E7%E3o.txt
Content-Type: text/plain; name*=ISO-8859-1''a%E7%E3o.txt; charset=UTF-8
Content-Transfer-Encoding: 7bit


Hggdh, what I sent you above, for the file "ação.txt" did not work. I received ATT<something).dat in Outlook Express. What I'm pasting now is for "ç.txt", that actually works perfectly.

--=-h+PqkzwHnOOeiXYbCxny
Content-Disposition: attachment; filename=ç.txt
Content-Type: text/plain; name=ç.txt; charset=UTF-8
Content-Transfer-Encoding: 7bit
-------- end comments --------
Darn! I do not have Outlook to test!

But I did sent to GMail a "ação.txt"-attached file. I can see the attachment, and it is correctly recognised; then name is hosed, though: "ação.txt".
Comment 21 C de-Avillez 2008-11-07 15:55:31 UTC
New comment from the Ubuntu bug (https://bugs.launchpad.net/ubuntu/+source/evolution-data-server/+bug/205999/comments/39)

-------- start comments --------

I tested a few cases (with the supplied hardy-packages on launchpad):

Äbö lü.txt
Äbölü.txt
Xxxxxxx xx XX-X Xxxxxxxxxxxxxxxxxx xx XxxxXxxxxxxxxx xx XXX XXXX 15Nov07.pdf
Xxxxxxx_xx_XX-X_Xxxxxxxxxxxxxxxxxx_xx_XxxxXxxxxxxxxx_xx_XXX_XXXX_15Nov07.pdf

Contrary to the comment of hggdh of Nov 5th, both long filenames (with
and without blanks) passed ok. So my experience is in line with
Effenberg0x0 (comment nr. 32)

However, the shorter names with "Umlaute" did not work out :( There is however an improvement. It is *not* anymore ATTXXXXX.DAT, just hyroghlyphic names with the original extension (s. attachment). It is remarkable that the name is shown differently in OWA (Web-Access) and Outlook.
Might be a problem of Encoding (us-ascii; 7 bit).

I can test more beginning of next week if required.

the relevant part of the header follows:

--=-+JaI8DjvsOFjibbhVfpv
Content-Disposition: attachment; filename=Äbölü.txt
Content-Type: text/plain; name=Äbölü.txt; charset=us-ascii
Content-Transfer-Encoding: 7bit


--=-+JaI8DjvsOFjibbhVfpv
Content-Disposition: attachment; filename="Äbö lü.txt"
Content-Type: text/plain; name="Äbö lü.txt"; charset=us-ascii
Content-Transfer-Encoding: 7bit


--=-+JaI8DjvsOFjibbhVfpv
Content-Disposition: attachment; filename="Xxxxxxx xx XX-X Xxxxxxxxxxxxxxxxxx xx XxxxXxxxxxxxxx xx XXX XXXX 15Nov07.pdf"
Content-Type: text/plain; name="Xxxxxxx xx XX-X Xxxxxxxxxxxxxxxxxx xx XxxxXxxxxxxxxx xx XXX XXXX 15Nov07.pdf"; charset=us-ascii
Content-Transfer-Encoding: 7bit


--=-+JaI8DjvsOFjibbhVfpv
Content-Disposition: attachment; filename=Xxxxxxx_xx_XX-X_Xxxxxxxxxxxxxxxxxx_xx_XxxxXxxxxxxxxx_xx_XXX_XXXX_15Nov07.pdf
Content-Type: text/plain; name=Xxxxxxx_xx_XX-X_Xxxxxxxxxxxxxxxxxx_xx_XxxxXxxxxxxxxx_xx_XXX_XXXX_15Nov07.pdf; charset=us-ascii
Content-Transfer-Encoding: 7bit


--=-+JaI8DjvsOFjibbhVfpv--

** Attachment added: "Owa-Outlook.png"
   http://launchpadlibrarian.net/19459766/Owa-Outlook.png

-------- end comments --------

Holger then added a new comment stating "Don't overestimate my guessing on encoding. On a second look, the specified charset and Encoding is for the content - which was in my test case empty dummy files. Will test further, but unfortunately only beginning of next week."
Comment 22 Milan Crha 2008-11-07 22:55:54 UTC
Created attachment 122211 [details] [review]
proposed eds patch ][

for evolution-data-server;

Updated patch. When I was testing the previous one, it worked fine for my characters, but for yours it's quite different. I tried with the u.txt and it yells it's not the UTF-8 valid text, thus this should help (it'll encode them to the form of "=XY", where XY is the code of the unknown character).

I also noticed from the above comments the file name is not always quoted, thus fixed that too.

One of the first replies, where if "filename*=", it seems like previously saved message. This works for new messages only.
Comment 23 C de-Avillez 2008-11-08 15:38:35 UTC
Thank, Milan. I will build an updated test package for the Ubuntu users.
Comment 24 C de-Avillez 2008-11-10 14:22:12 UTC
New comment from the Ubuntu bug:

@hgddh: I did not get the hardy packages with a simple 'sudo aptitude update; sudo aptitude upgrade'. Is there an error with the repository (non-updated package list?!) or is something messed up with my system? I installed manually:
ii  evolution-data-server                 2.22.3-0ubuntu3ppa5
ii  evolution-data-server-common  2.22.3-0ubuntu3ppa5
Hope that is all what was needed.

With this update, the problem seems solved (see screenschot in
attachment). Outlook Web Access also shows the attachment names
correctly (no screenshot attached). Thanks to everyone involved!

As a sidenote:
I did a comparison of the e-mail headers seen from within evolution (Ctrl+U to see the "source code" of the message, scrapping out the message content that also shows up) and of the e-mail headers seen from within outlook (via message properties, only "headers" schown, no content in-between):

holger@RL-U200:~/temp/evotests$ diff headers-seen-from-evo.txt headers-seen-from-outlook.txt
3c3
< Content-Transfer-Encoding: 8bit
---
> Content-Transfer-Encoding: 7bit
6,8c6,8
< Content-Disposition: attachment; filename=Äbölü.txt
< Content-Type: text/plain; name=Äbölü.txt; charset=UTF-8
< Content-Transfer-Encoding: 8bit
---
> Content-Disposition: attachment; filename=Äbölü.txt
> Content-Transfer-Encoding: base64
> Content-Type: text/plain; name=Äbölü.txt; charset=UTF-8
11,13c11,13
< Content-Disposition: attachment; filename="Äbö lü.txt"
< Content-Type: text/plain; name="Äbö lü.txt"; charset=UTF-8
< Content-Transfer-Encoding: 8bit
---
> Content-Disposition: attachment; filename="Äbö lü.txt"
> Content-Transfer-Encoding: base64
> Content-Type: text/plain; name="Äbö lü.txt"; charset=UTF-8
16,17c16,17
< Content-Disposition: attachment; filename=Hélène_photo.jpg
< Content-Type: image/jpeg; name=Hélène_photo.jpg
---
> Content-Disposition: attachment; filename=Hélène_photo.jpg
> Content-Type: image/jpeg; name=Hélène_photo.jpg
31,33c31,33
< Content-Disposition: attachment; filename="zurück is back.whatever"
< Content-Type: text/plain; name="zurück is back.whatever"; charset=UTF-8
< Content-Transfer-Encoding: 8bit
---
> Content-Disposition: attachment; filename="zurück is back.whatever"
> Content-Transfer-Encoding: base64
> Content-Type: text/plain; name="zurück is back.whatever"; charset=UTF-8


It is interesting to see that they show differences! I leave it to the experts to interpret the meaning (if any).
Furthermore, in the headers-view of outlook, the filenames show up "ugly", whereas in the usual Outlook-view of messages, they show up nice and clean as desired.

Hope this provides all the necessary information to the evo-hackers out
there that cannot and have not to access outlook/exchange.

Thanks again to everyone involved to have (hopefully completely) solved
this problem.

** Attachment added: "Screenshot of attachmentnames as seen in Outlook"
   http://launchpadlibrarian.net/19530101/Outlook-hardy_2.22.3-0ubuntu3ppa5.png
Comment 25 C de-Avillez 2008-11-10 14:22:43 UTC
I am wondering if locale might be affecting this.
Comment 26 Milan Crha 2008-11-10 14:43:33 UTC
I'm not sure how to read the differences, but one thing I'm sure about is that the filename/name params of the header should be enclosed in quotes. The second patch was supposed to do that every time. Furthermore, if text is not in the UTF-8 it "escapes" wrong characters. It'll break file names heavily, but they will be available as attachments, what I hope is good thing.

(In reply to comment #25)
> I am wondering if locale might be affecting this.

Hmm, maybe.
Comment 27 C de-Avillez 2008-11-10 18:33:26 UTC
Created attachment 122341 [details]
tar containing file that does not encode properly
Comment 28 Milan Crha 2008-11-10 22:35:04 UTC
Created attachment 122360 [details] [review]
proposed eds patch ]I[

for evolution-data-server;

Hopefully the last version. It doesn't work without evo's part.
Comment 29 Milan Crha 2008-11-10 22:37:30 UTC
Created attachment 122361 [details] [review]
proposed evo patch

for evolution;

it uses extern int camel_header_param_encode_filenames_in_rfc_2047 defined in camel, similar to camel_application_exiting, even here we write there in evo.
Comment 30 C de-Avillez 2008-11-11 17:21:29 UTC
seems to work fine against trunk, thanks. I will now get back to the Ubuntu bug, and start looking at backporting it.

Again, thank you, Milan.
Comment 31 Srinivasa Ragavan 2008-11-12 16:29:43 UTC
Milan, could you put a big 'HACK:' in the camel code? And commit ?
Comment 32 Milan Crha 2008-11-12 20:04:14 UTC
eds part committed to trunk. Committed revision 9756.
evo part committed to trunk. Committed revision 36779.

"HACK:" added in the comment before the global variable definition.
Comment 33 Suman Manjunath 2008-11-16 07:55:00 UTC
this breaks the mail component says bug reported downstream 
https://bugzilla.novell.com/show_bug.cgi?id=445397

After upgrading on 13-Nov-2008, evolution no longer shows mail component.
However other components are usable. When I start evolution from command line,
I see following errors.

(evolution:18776): e-utils-WARNING **: can't load plugin
'/usr/lib/evolution/2.26/plugins/liborg-gnome-exchange-operations.so':
/usr/lib/evolution/2.26/components/libevolution-mail.so: undefined symbol:
camel_header_param_encode_filenames_in_rfc_2047

(evolution:18776): e-utils-WARNING **: can't load plugin
'/usr/lib/evolution/2.26/plugins/liborg-gnome-exchange-operations.so':
/usr/lib/evolution/2.26/components/libevolution-mail.so: undefined symbol:
camel_header_param_encode_filenames_in_rfc_2047
evolution-shell-Message: Killing old version of evolution-data-server...

(evolution:18776): evolution-shell-WARNING **: Cannot activate
'OAFIID:GNOME_Evolution_Mail_Component:2.26': g_module_open of
`/usr/lib/evolution/2.26/components/libevolution-mail.so' failed with
`/usr/lib/evolution/2.26/components/libevolution-mail.so: undefined symbol:
camel_header_param_encode_filenames_in_rfc_2047'


(evolution:18776): e-utils-WARNING **: can't load plugin
'/usr/lib/evolution/2.26/plugins/liborg-gnome-default-mailer.so':
/usr/lib/evolution/2.26/components/libevolution-mail.so: undefined symbol:
camel_header_param_encode_filenames_in_rfc_2047

(evolution:18776): e-utils-WARNING **: can't load plugin
'/usr/lib/evolution/2.26/plugins/liborg-gnome-evolution-startup-wizard.so':
/usr/lib/evolution/2.26/components/libevolution-mail.so: undefined symbol:
camel_header_param_encode_filenames_in_rfc_2047

(evolution:18776): evolution-shell-WARNING **: Unknown component mail
(evolution:18776): e-data-server-DEBUG: Loading categories from
"/root/.evolution/categories.xml"
(evolution:18776): e-data-server-DEBUG: Loaded 29 categories

linux-xzu9:~ # QObject: Do not delete object, 'unnamed', during its event
handler!
Comment 34 Matthew Barnes 2008-11-16 16:19:13 UTC
Someone forgot to bump the "eds_minimun_version" in configure.in.
Comment 35 Matthew Barnes 2008-11-16 16:21:20 UTC
No, I take that back; it's bumped already.  Downstream reporter just needs to upgrade and rebuild their evolution-data-server.
Comment 36 Milan Crha 2008-12-10 16:25:58 UTC
*** Bug 339415 has been marked as a duplicate of this bug. ***
Comment 37 Akhil Laddha 2011-10-13 07:10:03 UTC
*** Bug 517893 has been marked as a duplicate of this bug. ***