[Kde-pim] Re: kmail + mdn reply + encoding

Ingo Klöcker kloecker at kde.org
Mon Jun 27 20:59:06 BST 2011


On Monday 27 June 2011, laurent Montel wrote:
> Hi,
> Could you help me to fix bug in encoding ?
>  KMime::MDN::dispositionNotificationBodyContent returns a string
> which is not encoding in utf-8 when I receive notification
> 
> in body I have:
> "Le message envoyé le 27/06/2011 10:27 à montel at kde.org avec le
> sujet « test mdn » a été affiché. Il n'est pas certain qu'il
> ait été lu ou compris"
> 
> Could you give me info for fixing it please ?

I don't really know KMime very well, but the following looks wrong:

>   firstMsgPart->contentType()->setMimeType( "text/plain" );
>   firstMsgPart->contentType()->setCharset( "us-ascii" );
>   firstMsgPart->contentTransferEncoding()->from7BitString( "7bit" );
>   firstMsgPart->setBody( description.toUtf8() );

It should probably be

>   firstMsgPart->contentType()->setMimeType( "text/plain" );
>   firstMsgPart->contentType()->setCharset( "utf-8" );
>   firstMsgPart->contentTransferEncoding()->from7BitString( "7bit" );
>   firstMsgPart->setBody( description.toUtf8() );

instead.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110627/9d6b41ec/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