Re: KMail encoding in base64

Ingo Klöcker <[email protected]>
Newsgroups gmane.comp.kde.users.pim
Message-ID <[email protected]>
Sorry, for the late reply.

On Thursday 23 July 2009, Stefan Roese wrote:
> On Wednesday 22 July 2009 23:46:19 Ingo Klöcker wrote:
> > > > KMail uses certain heuristics to determine whether the message
> > > > should be base64 encoded or quoted-printable encoded. In my
> > > > experience, base64 is chosen if the message is pretty short and
> > > > contains a few non-ASCII characters (i.e. umlauts, accented
> > > > letters, etc.).
> > > >
> > > > > and how to prevent KMail from doing this?
> > > >
> > > > Why do you want to prevent KMail from doing so?
> > >
> > > Because it's not allowed to send such mails to some mailing lists
> > > (e.g. u- boot: http://www.denx.de/en/Software/MailingLists).
> > >
> > > So is there currently no chance to prevent this base64 encoding
> > > in KMail?
> >
> > No. (Except for the obvious "patch the source code and compile
> > yourself".)
>
> Heh. ;)
>
> > Unless the ratio of non-ASCII characters in the message is too high
> > KMail shouldn't use base64 encoding. So as workaround you could
> > always add a few lines of ASCII characters (maybe as footer) to
> > bring the ratio of non-ASCII below the threshold.
>
> I already have a footer in most of my mails (including the base64
> one, see below). I would really like to avoid adding even more of
> such text to my mails.
>
> > Or maybe there's a bug in the
> > calculation of the ratio. Can you send me a sample message?
>
> Sure, please find one attached.

Hmm. I copied the message text to a new message. KMail 1.9.10 (KDE 3.5) 
uses quoted-printable encoding. There is only one non-ASCII character 
in the message, but if quoted-printable encoding is used then all of 
the '=' in the footer need to be quoted-printable encoded as well. This 
makes the usage of quoted-printable encoding a bit more expensive, but 
using base64 encoding still is much more expensive. Quoted-printable 
encoded the text of the sample message weighs 1609 bytes. base64 
encoded it weighs 1759 bytes.


Conclusion:

a) The heuristic in KMail 1.12 deciding which encoding to use seems to 
be buggy. Please file a bug report for this.

b) Replacing '=' by '-' in your footer might fix your problem or make it 
much less likely to occur.


> Thanks for looking into this.

Welcome!


Regards,
Ingo

_______________________________________________
KDE PIM users mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kdepim-users
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEABECAAYFAkpyGqUACgkQGnR+RTDgudg0KACgx42fKoKONnrBOkU27K5kUlHF
gnMAoIxxJogcCdSJQezaDfRnd7zPvLhy
=ceqX
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.