[Kde-pim] [patch] KMail: fox for text codecs + questions on KCharsets and QTextCodec::codecForLocale()->name() on UNIX

Ingo Klöcker kloecker at kde.org
Fri Mar 14 22:39:59 GMT 2008


On Friday 14 March 2008, Thomas McGuire wrote:
> Hi,
>
> On Friday 14 March 2008, Jarosław Staniek wrote:
> > For review.
> >
> > 1. For creating emails use codec returned by
> > KGlobal::locale()->encoding(), what on non-windows is equal to
> > QTextCodec::codecForLocale() (see KLocalePrivate::initEncoding()).
> > On windows QTextCodec::codecForLocale() returns "System", so we're
> > using GetLocaleInfo() to get the actual CP system's charset.
> >
> > 2. A fix for japanese codec on Windows and Mac (just switches from
> > shift-jis to jis7 in addition to the previous behaviour so would
> > not break things), see the comment added in the code.
>
> Disclaimer: I don't know much about encoding (I've only read the MIME
> RFCs now).
> I guess the patch is OK. The only problem I see is that
> networkCodec() is also used to decode MIME messages without a
> specified charset. However, according to the RFC, we should use
> us-ascii for that. But this has always been the case in KMail code,
> so I think it is no problem. I'm just wondering about the
> consequences of a changed networkCodec() here.

If we used us-ascii then a lot of mail send by users of broken products 
(mostly from a certain company) and loads of automatically generated 
messages could not be decoded correctly. Therefore we are using the 
local encoding instead of us-ascii.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080314/614c4e1a/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list