| Summary: | kmail doesn't show non-mime Japanese message | ||
|---|---|---|---|
| Product: | [Unmaintained] kmail | Reporter: | Takumi ASAKI <takumi> |
| Component: | general | Assignee: | kdepim bugs <pim-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Takumi ASAKI
2003-03-29 06:13:09 UTC
Hi ,
I think that if "charsets" of mail header does not
define (same as non-mime mail) ,
I would like to use "kernel->networkCodec" functions.
Because the function of "kernel->networkCodec" return
to suitable locale codec.
Please check below patch.
$diff -u kmmsgpart.cpp.org kmmsgpart.cpp
--- kmmsgpart.cpp.org Mon Mar 3 04:07:43 2003
+++ kmmsgpart.cpp Mon Mar 31 02:22:21 2003
@@ -6,6 +6,7 @@
#include <kdebug.h>
#include <kmdcodec.h>
+#include "kmglobal.h"
#include "kmmsgpart.h"
#include "kmmessage.h"
@@ -293,7 +294,8 @@
const QTextCodec * KMMessagePart::codec() const {
QTextCodec * c = KMMessage::codecForName( charset() );
if ( !c )
- c = QTextCodec::codecForName("iso-8859-1");
+// c = QTextCodec::codecForName("iso-8859-1");
+ c = kernel->networkCodec();
assert( c );
return c;
}
--
Toyohiro Asukai <toyohiro@ksmplus.com>
Subject: kdepim/kmail CVS commit by kloecker: Fix bug 56570: kmail doesn't show non-mime Japanese message Default to local encoding if no charset is specified for a message part. Patch by Toyohiro Asukai <toyohiro@ksmplus.com> CCMAIL: 56570-fixed@bugs.kde.org M +4 -1 kmmsgpart.cpp 1.99 --- kdepim/kmail/kmmsgpart.cpp #1.98:1.99 @@ -9,4 +9,5 @@ #include "kmmsgpart.h" #include "kmmessage.h" +#include "kmkernel.h" #include <kmime_charfreq.h> @@ -72,5 +73,7 @@ const QTextCodec * KMMessagePart::codec( const QTextCodec * c = KMMessage::codecForName( charset() ); if ( !c ) - c = QTextCodec::codecForName("iso-8859-1"); + // no charset means us-ascii (RFC 2045), so using local encoding should + // be okay + c = kernel->networkCodec(); assert( c ); return c; |