Bug 95157 - "Guess" the encoding of 8bit Subjects from the body Content-Type
Summary: "Guess" the encoding of 8bit Subjects from the body Content-Type
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kmail
Classification: Unmaintained
Component: mime (show other bugs)
Version: 1.7.2
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 105357 106964 118179 120819 122539 127014 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-14 18:09 UTC by Peter Volkov
Modified: 2012-08-19 00:46 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screen shot of kmail window that illustrates the problem. (103.84 KB, image/png)
2004-12-14 20:27 UTC, Peter Volkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Volkov 2004-12-14 18:09:43 UTC
Version:           1.7.2 (using KDE 3.3.2, Gentoo)
Compiler:          gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
OS:                Linux (i686) release 2.6.9-gentoo-r8

Hello.

I can't read mail's subject in many letters. It's very annoying. The problem is with messages like following:
*****
Subject: Добро пожаловать на форумы Gazety.Ru
MIME-Version: 1.0
Content-type: text/plain;
  charset=windows-1251
Content-transfer-encoding: 8bit
Charset: windows-1251
Добро пожаловать на форумы Gazet
*****

Kmail does not interpret subject to be in cp1251 encoding. So subject is unreadable. The only subjects I can read are of such form: ?Windows-1251?B?wPDj7iDoIMHr/ufu4uD/IODw9eDo6uA=?=

Another issue. Changing charset in view menu only affects message body. And subject charset remains the same.

So. 1) I think kmail should set subject encoding same to the body, if it's not mentioned otherwise. 2) And changing charset in view menu should affect subject, for such mails...

Thank you for your attention.
IMHO kmail is best mail client for Linux now.
Thank you.
Comment 1 Thiago Macieira 2004-12-14 18:52:48 UTC
Can you attach one such digest to this bug report, intact? It would help us find the problem. A screenshot of KMail exhibiting the buggy behaviour would also be nice.

As far as I understood, the problem happens only on the headers of the attached messages. You said you can see some subjects, but I did not quite understand what exactly makes them different: do you see the Base64-encoded version or the decoded form?

As for the message list pane, sorry, but it should be working fine. Email headers are, as per RFC 2047, restricted to 7-bit. So email headers MUST use the RFC 2047 form of encoding (which is actually what you seem to have working). Anything else is broken behaviour on the part of the sender's email client.
Comment 2 Peter Volkov 2004-12-14 20:27:08 UTC
Created attachment 8664 [details]
Screen shot of kmail window that illustrates the problem.

In next comments I'll show the messages.
Comment 3 Peter Volkov 2004-12-14 20:42:44 UTC
As you can see from the message in #2 there is a problem with the first mail. Below is the source of mail:
*****
Return-path: <gazety@undeliverable.zenon.net>
Received: from [195.2.83.184] (port=25 helo=frontend1.aha.ru)
 by mx3.mail.ru with esmtp 
 id 1CdVlC-000J66-00
 for my_mail@mail.ru; Sun, 12 Dec 2004 18:35:46 +0300
Received-SPF: none (mx3.mail.ru: 195.2.83.184 is neither permitted nor denied by domain of undeliverable.zenon.net) client-ip=195.2.83.184; envelope-from=gazety@undeliverable.zenon.net; helo=frontend1.aha.ru;
Received: from [195.2.72.36] (HELO pm3.zenon.net)
  by frontend1.aha.ru (CommuniGate Pro SMTP 4.2.6)
  with ESMTP-TLS id 117812431 for torre_cremata@mail.ru; Sun, 12 Dec 2004 18:35:46 +0300
Received: (from gazety@localhost)
 by pm3.zenon.net (8.12.9/Zenon/Postman) id iBCFYn8M044316;
 Sun, 12 Dec 2004 18:34:49 +0300 (MSK)
 (envelope-from gazety)
Message-Id: <200412121534.iBCFYn8M044316@pm3.zenon.net>
To: torre_cremata@mail.ru
Subject: Добро пожаловать на форумы Gazety.Ru
MIME-Version: 1.0
Content-type: text/plain;
  charset=windows-1251
Content-transfer-encoding: 8bit
Date: Sun, 12 Dec 2004 15:34:48 UT
From: admin@gazety.ru
X-Spam: Not detected
Status: RO
X-Status: RC
X-KMail-EncryptionState:  
X-KMail-SignatureState:  
X-KMail-MDN-Sent:  

Charset: windows-1251
*****

Yes. Actually the problem is on the senders email side. It sends 8 byte encoded subjects. But I think that there exist(?) a way to determine such broken subjects and recode them. The charset can be taken from the message body.

So now I see that this is not a bug, but this can become an item in the wishlist. So if it possible to make such messages visible, this would be great. There are still many servers, that send such broken mails...

P.S. Thank you for fast response.
Comment 4 Thiago Macieira 2004-12-15 00:16:53 UTC
I am changing the Summary of the bug to reflect your wish.

I don't like the broken behaviour in the emails I receive, but this could be a handy feature.
Comment 5 Ingo Klöcker 2005-05-16 16:33:35 UTC
This is related to (but no duplicate of) wish #65766.
Comment 6 Thiago Macieira 2005-05-18 13:16:45 UTC
*** Bug 105357 has been marked as a duplicate of this bug. ***
Comment 7 Thiago Macieira 2005-06-08 13:13:00 UTC
*** Bug 106964 has been marked as a duplicate of this bug. ***
Comment 8 Thiago Macieira 2005-12-14 22:43:31 UTC
*** Bug 118179 has been marked as a duplicate of this bug. ***
Comment 9 Thiago Macieira 2006-01-06 23:03:35 UTC
*** Bug 119641 has been marked as a duplicate of this bug. ***
Comment 10 Thiago Macieira 2006-01-19 18:34:49 UTC
*** Bug 119641 has been marked as a duplicate of this bug. ***
Comment 11 Martin Koller 2006-01-21 18:04:55 UTC
For 3.5.1 I changed kmail to use the fallback charset even in the subject line, when none is given there (no rfc2047 conforming tags in Subject)
Comment 12 Thiago Macieira 2006-01-31 10:39:55 UTC
*** Bug 120819 has been marked as a duplicate of this bug. ***
Comment 13 Thiago Macieira 2006-02-26 02:10:40 UTC
*** Bug 122539 has been marked as a duplicate of this bug. ***
Comment 14 Ben Aceler 2006-04-27 20:16:34 UTC
>For 3.5.1 I changed kmail to use the fallback charset even in the subject line, when none is given there (no rfc2047 conforming tags in Subject) 

Kmail 3.5.2 - problem not solved.
Comment 15 Thiago Macieira 2006-04-29 23:01:03 UTC
There is no problem to solve since this is not a bug.
Comment 16 Magnus Holmgren 2006-04-29 23:21:21 UTC
Accordingly, this is a wishlist item.

One can of course debate whether it's right to adapt to broken software - it may discourage the authors from fixing what's broken and encourage others to write more broken software. But in practice, you have limited power.
Comment 17 Ben Aceler 2006-04-30 08:34:16 UTC
You see.... this issue makes kmail unuseable for many users.
And... the body of such broken mail is recoding succesfully, why not the header?
And third: when I set encoding manually, it affects only on the body, not the header. So, the header is always unreadable.
Comment 18 Thiago Macieira 2006-05-03 01:25:36 UTC
Ben: you have to understand that the Header being broken does not mean the Body is broken too. In fact, most mailers get the body right, but not the header. This is what KMail can't decode.

KMail works perfectly as long as the other side is sending properly-formatted emails. If your peer is using broken software, please urge him to upgrade. The specification that says how an email should be encoded has existed for 9 and a half years.

That said, however, if we didn't think it would be useful to have this feature, we wouldn't have an open wish report. So, yes, we will probably implement it. It's just not a high priority.
Comment 19 Philippe Léveillé 2006-05-03 06:31:34 UTC
I'll have to agree with Ben though, as most end-users would. As a user, I think that this is part of the software and would really help you guys out with the "wish" that KDE is usable by many people (not just the ones using EXCLUSIVELY simple charsets)

Moreover, this is one of the first, if not the first thing you notice when you first configure an email account. At this stage, it pretty easy to switch to another client.

I really don't want to be a pessimist but I think you should really give a second thought about the "priority" state of this "wish" (read bug).

Still, I love KMail ;-)
Comment 20 Ben Aceler 2006-05-03 08:16:16 UTC
OK, thanks.
But I mean another problem. When I set encoding using kmail menu (for such broken letter, I still need to read headers :)), it affects only the body. Can it affect the headers too?
Or, do I have to post a new bug? :) Last time Thiago said, that this duplicating it (bug 122539).
Comment 21 Thiago Macieira 2006-05-06 12:41:29 UTC
Right, leave it in this one.

And, yes, it is a wish: working around other mailers brokenness is not a bug in our side.
Comment 22 Thiago Macieira 2006-05-17 16:03:22 UTC
*** Bug 127014 has been marked as a duplicate of this bug. ***
Comment 23 Myriam Schweingruber 2012-08-18 08:13:57 UTC
Thank you for your feature request. Kmail1 is currently unmaintained so we are closing all wishes. Please feel free to reopen a feature request for Kmail2 if it has not already been implemented.
Thank you for your understanding.
Comment 24 Luigi Toscano 2012-08-19 00:46:14 UTC
Instead of creating a new feature request, please confirm here if the wishlist is still valid for kmail2.