Bug 325299 - When sending Kmail always uses utf-8 encoding despite configuration option
Summary: When sending Kmail always uses utf-8 encoding despite configuration option
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail2
Classification: Applications
Component: commands and actions (show other bugs)
Version: 4.11.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-25 14:03 UTC by korgens
Modified: 2017-01-07 21:54 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 korgens 2013-09-25 14:03:13 UTC
In Kmail settings (Configurations -> Configure Kmail -> Compositor -> Character set encoding) the user can list the character encoding preferences that kmail will use when sending the email. In theory the first charset that can acommodate all letters in the message will be used.

It seems that this settings are not followed for message headers. When using Kmail in a coporate environment where most of the people use MS Outlook/MS Exchange every Kmail sent message arrives for them incomprehensible. The only way to send them a correctly encoded mail is to make sure that there are no non-ascii chars in the heardes. That means manually retyping every email address to strip people names and the subject line to remove non-ascii characters. It is also very time consuming and tedious for discussion threads.

By looking at the message source one can see that in some places that encoding are changed to teh desired (ISO-8859-1, for instance) but in the same message it also includes utf-8 encoding. This mixing of encodings is not respecting the settings definitions and it causes other email clientes to incorrectly display the charset encoding.




Reproducible: Always

Steps to Reproduce:
1. Go to Settings -> Configure Kmail -> Composer -> Character encoding . Remove all items from the list and add only "ISO-8859-1". Push Apply and then Close.
2. Click on new email to start a new message.
3. On the "TO:" field type "Ação" (that's A &ccedil; &atilde; o) <youraddress@example.com>
4. On the "Subject field" type "Açaí" (That's A &ccedil; a &iacute;)
5. On the message body, type anything, but include a few non-ascii chars, like: "Sequência" (&ecirc;)
6. In the Sent folder, click on the just sent email and the Manu "view->view source"
7. See that there should be only ISO-8859-1 tags but there are also UTF-8 tags.
Actual Results:  
From: My Name <my.name@example.com>
To: =?ISO-8859-1?Q?A=E7=E3o?= <my.name@example.com>
Subject: =?UTF-8?B?QcOnYcOt?=
Date: Wed, 25 Sep 2013 10:46:37 -0300
Message-ID: <4109830.nKvFdzYvjl@hostname>
X-KMail-Identity: 243885538
Disposition-Notification-To: My Identity <my.name@example.com>
User-Agent: KMail/4.10.5 (Linux/3.8.0-30-generic; KDE/4.10.5; x86_64; ; )
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"

Sequ=EAncia

Expected Results:  
From: My Name <my.name@example.com>
To: =?ISO-8859-1?Q?A=E7=E3o?= <my.name@example.com>
Subject: =?ISO-8859-1?Q?a=E7a=ED?= 
Date: Wed, 25 Sep 2013 10:46:37 -0300
Message-ID: <4109830.nKvFdzYvjl@hostname>
X-KMail-Identity: 243885538
Disposition-Notification-To: My Identity <my.name@example.com>
User-Agent: KMail/4.10.5 (Linux/3.8.0-30-generic; KDE/4.10.5; x86_64; ; )
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"

Sequ=EAncia

It seems that there is indeed an error and that is the fact that Kmail is not respecting the encoding preferences.

Although kmail itself can handle multiple different encodings, it seems that MS products can't. This annoys MS Outlook and MS Exchange users. Some of them are already questioning that should I use their non-free system, they would not be annoyed.
Comment 1 korgens 2013-09-25 20:55:37 UTC
I've also tested this in Archlinux with  KMail/4.11.1 (Linux/3.11.1-1-ARCH; KDE/4.11.1; x86_64; ; ). The same thing happens.

But there is also another twist: I've removed all special encodings (including the default ISO-8859-1) but left only utf-8. In theory everything should be encoded in utf-8, right? However, I've sent again a mail to myself and saw that both encodings are still there, mixed:
-------
From: My Identity <me@example.com>
To: =?ISO-8859-1?Q?A=E7a=ED?= <me@example.com>
Subject: =?UTF-8?B?YcOnYcOt?=
Date: Wed, 25 Sep 2013 17:48:25 -0300
Message-ID: <2082589.RYzBDM2sPb@hostname>
X-KMail-Identity: 121210829
User-Agent: KMail/4.11.1 (Linux/3.11.1-1-ARCH; KDE/4.11.1; x86_64; ; )
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"

a=E7a=ED...
---------
Comment 2 Denis Kurz 2016-09-24 18:08:54 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of kmail2 (version 5.0 or later, as part of KDE Applications 15.12 or later), it gets closed in about three months.
Comment 3 Denis Kurz 2017-01-07 21:54:23 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.