[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    A fix patch of "Auto Detect Encoding" (for Japan/Korea)
From:       Toshitaka Fujioka <toshitaka () kde ! gr ! jp>
Date:       2001-02-17 9:57:41
[Download RAW message or body]

Hello,

When encoding is automatic, as for the mail which "Charset" cannot
distinguish, "Charset" is set in "iso8859-1", but one of "iso-2022-jp"
is convenient in Japan (Korea is "euc-kr").
(CVS of 16/02)

Please try to use. :-)
If my patch is wrong, please advise.







["kdenetwork-kmail-AutoDetectEncoding-fix-ja-ko-20010217.diff" (text/plain)]

diff -ur kdenetwork.org/kmail/kmreaderwin.cpp kdenetwork/kmail/kmreaderwin.cpp
--- kdenetwork.org/kmail/kmreaderwin.cpp	Sat Feb 17 04:23:29 2001
+++ kdenetwork/kmail/kmreaderwin.cpp	Sat Feb 17 04:43:30 2001
@@ -561,8 +561,14 @@
         encoding = msgPart.charset();
       }
     }
-    if (encoding.isEmpty())
-      encoding = "iso8859-1";
+    if (encoding.isEmpty()) {	     
+       if (KGlobal::locale()->charset() == "jisx0208.1983-0")
+         encoding = "iso-2022-jp";
+       else if (KGlobal::locale()->charset() == "ksc5601.1987-0")
+         encoding = "euc-kr";
+       else
+         encoding = "iso8859-1";
+    }
     mCodec = KMMsgBase::codecForName(encoding);
   }
 

_______________________________________________
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