[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Re: Bug#16244: patch: reply to multipart/alternative when main part has no charset defined
From: Michael =?iso-8859-1?q?H=E4ckel?= <Michael () Haeckel ! Net>
Date: 2000-11-29 16:27:08
[Download RAW message or body]
On Wednesday, 29. November 2000 14:39, Wolfgang Rohdewald wrote:
>
> 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();
Committed, thanks for the patch.
BTW: If a QString isNull() then it is also isEmpty().
Regards,
Michael Häckel
_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic