Bug 362697

Summary: Attachments with Koi-8 encoded file names are not displayed correctly
Product: [Applications] kdepim Reporter: Alexander Yavorsky <kekcuha>
Component: messageviewerAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: aspotashev, kde
Priority: NOR    
Version: 5.6.3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
URL: https://oc.t-rosta.com/owncloud/index.php/apps/gallery/s/9q5GBrPxeO5204s#snapshot2.png
Latest Commit: Version Fixed In:

Description Alexander Yavorsky 2016-05-05 10:38:47 UTC
When received message with attached files with file names encoded in koi-8, file names in the header and in the message are not displayed correctly. Correct file name are only in Message structure window.

Reproducible: Always




Here is source code of recived mail:
---
Content-Type: multipart/alternative;
	boundary=Apple-Mail-A1146E27-85EB-4D82-97D1-AC742CC02D3F
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (1.0)
Subject: =?koi8-r?B?4tXExdQgxNfBINDB09DP0tTBIM7BxM8g08TFzMHU2CDOwSDE18/J?=
 =?koi8-r?B?yCDF08zJINfP2s3P1s7PINDP0M/Mwc0=?=
To: =?koi8-r?B?4czFy9PBzsTSIPHXz9LTy8nK?= <DELETED>
X-Mailer: iPhone Mail (13E238)
...
Content-Type: image/jpeg;
	name="_______ ____ _____ ________ 2.JPG";
	x-apple-part-url=9CD3F4CA-7FC5-4C6A-9341-86581C3C942A
Content-Disposition: inline;
	filename*=koi8-r''%D0%C1%D3%D0%CF%D2%D4%20%F6%C5%CE%C9%20%CE%CF%D7%C1%D1%20%D0%D2%CF%D0%C9%D3%CB%C1%202.JPG
Content-Transfer-Encoding: base64
Comment 1 Axel Hinrichs 2017-05-12 12:47:31 UTC
I can confirm this bug with some additional info. I have the same problem with utf-8 coded filename* parameters. So it looks like the messageviewer does not implement https://tools.ietf.org/html/rfc5987 which then referes to https://tools.ietf.org/html/rfc2231. 

(Very) short summary: One can issue a MIME Header

Content-Disposition: ..., filename=filename.ext 

or - if the filename contains non ISO-8859-1 letters:

Content-Disposition: ..., filename*=coding'language'filename.ext 

So in my case the MIME-Part header looks like:

Content-Disposition: attachment;
 filename*="utf-8''some-filename-with-utf-8-encoding.ext"

Double quotes are optional but allowed according to RFC. 

Kmail takes everything between the double quotes literally as the filename.

I'm on arch linux so everything pretty current: KDE Apps 17.04.1, Plasma 5.9.5, Framework 5.33.0, QT 5.8.0
Comment 2 Axel Hinrichs 2017-11-20 21:22:47 UTC
Really no one even confirmed? This is a bug against current messageviewer (despite original report) not implementing a mime related RFC?

Roundcube does it, Thunderbird, python mime lib... even recent Outlook!

Last checked KDE Apps 17.08.3
Comment 3 Axel Hinrichs 2017-12-20 12:37:20 UTC
Progress! Kmail 5.6.3 can handle this, so e.g. the following header works:

  Content-Disposition: attachment; filename*=utf-8''Hall%C3%B6chen.pdf
Comment 4 Justin Zobel 2022-11-10 22:33:05 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 5 Bug Janitor Service 2022-11-25 05:16:15 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Bug Janitor Service 2022-12-10 05:13:31 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!