Comment 7 for bug 206396

Revision history for this message
In , Aiacovitti (aiacovitti) wrote :

I applied the following patch on kopete (kde 3.5.10) and the problem with accented characters has gone.
It consists in converting messages on utf8 before send or display. I'm not expert, may be this is a "dirty" patch, but anyway it works for me.... upstream developers will know better than me if side effects are triggered...

Regards.
Andrea.

--- kdenetwork/kopete/protocols/meanwhile/meanwhilesession.cpp 2009-01-19 12:17:30.000000000 +0100
+++ kdenetwork/kopete/protocols/meanwhile/meanwhilesession.cpp 2009-01-19 12:18:01.000000000 +0100
@@ -351,7 +351,7 @@
         mwConversation_open(conv);

     } else if (!mwConversation_send(conv, mwImSend_PLAIN,
- message.plainBody().ascii())) {
+ message.plainBody().utf8())) {
         convdata->chat->appendMessage(message);
         convdata->chat->messageSucceeded();
     }
@@ -808,7 +808,7 @@
         for (it = convdata->queue->begin(); it != convdata->queue->end();
                 ++it) {
             mwConversation_send(conv, mwImSend_PLAIN,
- (*it).plainBody().ascii());
+ (*it).plainBody().utf8());
             convdata->chat->appendMessage(*it);
             convdata->chat->messageSucceeded();
         }
@@ -857,7 +857,7 @@
     case mwImSend_PLAIN:
         {
             Kopete::Message message(convdata->contact, account->myself(),
- QString((char *)msg), Kopete::Message::Inbound);
+ QString::fromUtf8((char *)msg), Kopete::Message::Inbound);
             convdata->chat->appendMessage(message);
         }
         break;