Bug 237277 - Accents not properly displayed when using 'Paste as Attachment' functionality
Summary: Accents not properly displayed when using 'Paste as Attachment' functionality
Status: VERIFIED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-11 19:56 UTC by Sabine Faure
Modified: 2010-05-21 00:42 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 Sabine Faure 2010-05-11 19:56:57 UTC
Version:            (using Devel)
Compiler:          gcc 4.3.2 
OS:                Linux
Installed from:    Compiled sources

- Launch Kmail
- Click on 'New'
- Fill in the recipient's email, the subject and in the text editor, type in a few words including some with accents (ex: récréation, tâches...)
- Select the text and go to Edit menu/Copy
- Go to Edit menu/Paste as Attachment
- An attachment is added at the bottom of the composer window
- Double click on it to open it

The text has been properly pasted except for the accentuated letters which have been replaced by '?'

Trunk, Svn Rev 1125510
Comment 1 Sabine Faure 2010-05-11 20:07:21 UTC
If you try saving the email as draft you get the following error message:
'8bit Content-Transfer-Encoding cannot correctly encode this message. Please report this bug.

Trunk, Svn Rev 1125510
Comment 2 Laurent Montel 2010-05-12 12:05:47 UTC
When I double click it open it in kate... and it's ok.
What is opening for you ?

Regards
Comment 3 Thomas McGuire 2010-05-12 16:40:17 UTC
Laurent: I already started working on this, I have a patch ready but I need to fix some conflict first, then I can commit.
Comment 4 Thomas McGuire 2010-05-12 16:55:05 UTC
SVN commit 1125867 by tmcguire:

Don't allow 8bit encoding for text attachments.

BUG: 237277

 M  +3 -1      attachmentpart.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1125867
Comment 5 Thomas McGuire 2010-05-12 16:57:04 UTC
> If you try saving the email as draft you get the following error message:
> '8bit Content-Transfer-Encoding cannot correctly encode this message. Please
> report this bug.

This part is now fixed, but not yet the other parts, working on that.
Comment 6 Thomas McGuire 2010-05-12 18:11:56 UTC
(Reopening, only partly fixed)
Comment 7 Thomas McGuire 2010-05-14 19:49:56 UTC
SVN commit 1126721 by tmcguire:

Make attachment viewing work properly.

We now construct an actually valid KMime::Content, by using the
AttachmentJob.

BUG: 237277

 M  +22 -6     attachmentcontrollerbase.cpp  
 M  +1 -0      attachmentcontrollerbase.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1126721
Comment 8 Sabine Faure 2010-05-17 19:48:11 UTC
I retested this today and it still does not seem to work:

The accents are still replaced by ? when using Kwrite and Open Office to view the file.

In Open Office the default encoding does not work but I tried selecting 'Iso-8859-1' instead and then the accents were properly displayed when opening the attachement.

I am reopening this bug because the accents should be displayed properly with the default option and both in Open Office and Kwrite.

Trunk, Svn Rev 1127799
Comment 9 Thomas McGuire 2010-05-20 18:15:00 UTC
SVN commit 1128910 by tmcguire:

Fix charset in "paste as attachment" action.

Simply use UTF-8, other applications deal with that best.
Using toLatin1() here was a bug, since that does only work with a few
latin characters.

BUG: 237277

 M  +2 -1      kmcomposewin.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1128910
Comment 10 Sabine Faure 2010-05-21 00:42:44 UTC
It is corrected now.

The accents included in an attachment are properly displayed now.

Trunk, Svn Rev 1128989