Bug 55624 - base64 TEXT/PLAIN attachment: no conversion of dos-style end of line
Summary: base64 TEXT/PLAIN attachment: no conversion of dos-style end of line
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: mime (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-06 20:38 UTC by Andreas Amann
Modified: 2007-09-14 12:17 UTC (History)
0 users

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 Andreas Amann 2003-03-06 20:38:36 UTC
Version:            (using KDE KDE 3.1)
Installed from:    Compiled From Sources
Compiler:          gcc-3.1 
OS:          Linux

If a base64 TEXT/PLAIN attachment is saved to a file (under unix),
kmail-1.5 does not convert from DOS-style to unix-style end of line  markers, 
as it IMHO should, and for instance mutt or pine do.

Similarly no conversion is done while sending such attachments. Again pine and 
mutt always convert to DOS-style but here I am really sure what the correct bahavior is.

reproduce by sending a base64 encoded TEXT/PLAIN attachment to yourself and save it to a file using kmail. The resulting file will have CRLF end of line, while the original file had not.
Comment 1 Stephan Kulow 2003-09-24 21:41:59 UTC
is there some standard that says what pine/mutt do, is needed? Otherwise 
it's a wishlist. 
Comment 2 Andreas Amann 2003-10-08 18:21:49 UTC
Subject: Re:  base64 TEXT/PLAIN attachment: no conversion of dos-style end of line

> is there some standard that says what pine/mutt do, is needed? Otherwise
> it's a wishlist.

In rfc 2045, which to my knowledge defines Base64 encoding,  we find:

6.8.  Base64 Content-Transfer-Encoding
...
   Care must be taken to use the proper octets for line breaks if base64
   encoding is applied directly to text material that has not been
   converted to canonical form.  In particular, text line breaks must be
   converted into CRLF sequences prior to base64 encoding.  The
   important thing to note is that this may be done directly by the
   encoder rather than in a prior canonicalization step in some
   implementations.
...

The correct behavior is therefore to convert text/plain attachments to CRLF 
line breaks first, then encode in base64.
Upon receiving, we should decode from base64, and then convert the CRLF 
sequences to the canonical linebreaks of the system. 


Comment 3 Ingo Klöcker 2003-10-09 01:52:54 UTC
so it's a bug and no wish 
Comment 4 Anatoly Pugachev 2004-07-08 15:42:22 UTC
Any way to make kmail support base64 encoding in Menu->Settings->Configure KMail->Network->Message Property ?
Comment 5 Till Adam 2004-10-24 12:53:01 UTC
Andreas, I believe this was fixed a while ago by David. Can you please reopen this bug report if you are still having problem with KMail 1.7 or later? Thanks.
Comment 6 Andreas Amann 2004-10-25 14:05:33 UTC
As the original reporter, I can confirm that the bug is now RESOLVED 
(testet with kmail 1.6.2 on "debian testing")
Thanks a lot for this one!