[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: Bug#16244: patch: reply to multipart/alternative when main part has no charset defined
From: Wolfgang Rohdewald <wr () poboxes ! com>
Date: 2000-11-29 13:39:16
[Download RAW message or body]
Package: kmail
Version: 1.2 (KDE 2.0.9 >= 20001128)
Severity: normal
Compiler: gcc version 2.95.2 19991024 (release)
OS: Linux 2.2.16 i686 (compiled sources)
I have a multipart/alternative message which does not define a charset in the main headers,
but the message part does. The charset of the message part is not used
by KMMessage::asQuotedString. This patch uses the charset of the part
if and only if the main headers don't define it.
Problem (why I found this): IF codecForLocale() is used, the umlauts
appear rather strangely in the quoted text. The UTF-8 codec is used.
An a umlaut ( and the next char become =EF=BF=N^H=BD (quoted-printable)
or ? (8bit)
Why ? I suspect this is a known problem.
--- ../kmail.org/kmmessage.cpp Wed Nov 29 14:19:32 2000
+++ kmmessage.cpp Wed Nov 29 14:21:31 2000
@@ -619,6 +619,13 @@
isInline = (stricmp(msgPart.contentDisposition(), "inline") == 0);
if (isInline) {
+ if (cset.isEmpty() || cset.isNull()) {
+ cset = msgPart.charset();
+ if (!cset.isEmpty() && !cset.isNull())
+ codec = KGlobal::charsets()->codecForName(charset());
+ else
+ codec = QTextCodec::codecForLocale();
+ }
if (stricmp(msgPart.typeStr(),"text") == 0 ||
stricmp(msgPart.typeStr(),"message") == 0) {
Kpgp* pgp = Kpgp::getKpgp();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic