Bug 135940 - kmail sent mail renames attachments with international characters
Summary: kmail sent mail renames attachments with international characters
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: mime (show other bugs)
Version: 1.9.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-19 01:48 UTC by Jose Medellin
Modified: 2016-07-21 12:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jose Medellin 2006-10-19 01:48:54 UTC
Version:           1.9.5 (using KDE KDE 3.5.5)
Installed from:    Gentoo Packages
Compiler:          gcc 3.4.4 
OS:                Linux

Ok, plain and simple (I think)

Whenever I send an e-mail which includes attachments with international characters (accented characters are the ones mainly used) I have troubles.

Upon further inspection, when international characters are not included, the attachment tag is something like:

name="Name of File.ods"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;filename="Name of File.ods"

But when an international character is included, the tag changes to:

name*=iso-8859-1''Some%20File%20%20Nam%F3%2Eods
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
    filename*=iso-8859-1''Some%20File%20%20Nam%F3%2Eods

That same e-mail was sent to hotmail, yahoo, a mailserver running squirrelmail and to kmail itself.

Kmail interpreted things correctly
Squirrelmail, Hotmail, and Yahoo Didnt..

The three options (Squirrelmail, hotmail and yahoo) understood that it was an opendocument spreadsheet, but none of them had the name correctly..

Squirrelmail just said:  no name
Yahoo: file.bin
Hotmail:  attachment (as-is without extension)

Also as a test, I sent a mail with an attachment including international characters from yahoo to hotmail, and the result in the attachment tag was:

name="Some File Namé.ods"
Content-Description: 1329823095-Some File Namé.ods
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Some File Namé.ods"

without the iso stuff and it got interpreted correctly by hotmail... Is this by standard??  

It's kinda frustrating to rename every attachment to not include international characters every time and when you forget to do so, people get their attachments unreadable (of course it's only the filename and extension, but you know people :))

Is there anything I may be missing here?? How else can I debug the thing?

I've been tracking this bug since 3.5.4, haven't found any references to the situation on kde bugzilla, so I decided to post it..

Anything else needed?

Thanks!
Comment 1 Ingo Klöcker 2006-10-23 21:14:21 UTC
KMail uses the standard way to encode the names of attachments containing international characters. If this is a problem then enable "Outlook-compatible attachment naming" in the Composer configuration.
Comment 2 Jose Medellin 2007-01-06 00:48:21 UTC
1. Initially Fixed by modifying the setting outlook-compatible-attachments=true
2. Changed default system locale to es_MX.UTF8
3. Problem back again ignoring outlook-compatible-attachemnts=true option in kmailrc

Hi, Ingo... Sorry for not reading the darn instructions correctly...  After I read your response I was able to find quite some information about this, but I swear that I did some research before and was unable to find a reference. Anyway, I solved it back then without problems, but unfortunately I'm  back because the problem is as well.

The thing is that the problem is back again and I'm guessing that it has something to do with the new locale of my machine (which is now UTF-8).  I switched because I had several problems in my system and most of them are gone by now.

The thing is that only today I realized that the problems with the attachments was back again.  It is sending again the attachment "header" in the form of:

name*=iso-8859-1''Some%20File%20%20Nam%F3%2Eods 
 Content-Transfer-Encoding: base64 
 Content-Disposition: attachment; 
     filename*=iso-8859-1''Some%20File%20%20Nam%F3%2Eods 

even with the outlook-compatible-attachments=true option set in kmailrc!!!.  I actually had some problems with the codepages so i was playing with those options.

In appearance/Message window i've tried (my kde is in spanish so I don't have the exact legend):

1.
 - Default Character Set : UTF8
 - Prevails over : Auto

2.
 - Default Character Set : UTF8
 - Prevails over : 8859-1

3.
 - Default Character Set : 8859-1
 - Prevails over : Auto

4. 
 - Default Character Set : 8859-1
 - Prevails over : UTF8

And also in editor codepage I've tried setting alone (meaning that I delete everything else):

1. 
 - us-ascii

2.
 - 8859-1

3.
 - utf-8

4.
 - locale (which is set to utf-8)

And it just doesn't work.  I've been playing around with all those settings in an ordered way and just got the same result of kmail sending attachment "headers" the standard way (RFC - Compliant) ignoring the outlook-compatible-attachments=true setting no matter which of the aforementioned settings I changed

I've tried at first running 'LC_ALL=en_US kmail' to see if the problem went away, but kmail stays in spanish so I guess it's not working (I remember I have to change X locale, not just kmail, so I have to reset or something and I can't do it right now, only later or tomorrow).  I'm going to try some things different to try and debug this a little more, but I guessed that maybe I was missing something really stupid (again!) so I would post here to ask for your precious help..

Also... I used a new user (without any info... removed user kmailrc and only used /usr/share/kde/3.5/share/config/kmailrc - which had no other line but outlook-compatible-attachments=true -).  I opened kmail and the option in kmail configuration of compatibility of attachments with outlook was checked, but upon composing a mail the same RFC-Compliant (Outlook incompatible) way of inserting attachments was used.

Thanks a lot, and really really sorry if I'm wasting your time (again!)

oohhh and BTW, have a great 2007!!

Mede
Comment 3 Laurent Montel 2015-04-12 09:54:05 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.
Comment 4 Alexander Yavorsky 2016-05-18 08:39:34 UTC
It's seems like this bug still valid in Kmail2 (i use version 5.1.3).
Comment 5 Alexander Yavorsky 2016-07-21 12:00:25 UTC
Still unfixed in 5.2.3 
And unfortunately  i've submit duplicate bug- https://bugs.kde.org/show_bug.cgi?id=362650