[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/kopete/libkopete/private
From: Carsten Pfeiffer <carpdjih () mailbox ! tu-berlin ! de>
Date: 2003-04-27 21:51:47
[Download RAW message or body]
CVS commit by pfeiffer:
read QProcess' output int utf-8, as it is written and not latin1, as
QProcess does by default
M +7 -0 kopetexmllogger.cpp 1.10
--- kdenonbeta/kopete/libkopete/private/kopetexmllogger.cpp #1.9:1.10
@@ -21,4 +21,5 @@
#include <kstandarddirs.h>
#include <qprocess.h>
+#include <qtextcodec.h>
#include "kopetemetacontact.h"
@@ -86,4 +87,9 @@ const QValueList<KopeteLogEntry> KopeteX
QString buff;
+ // we're reading utf-8 output, however, QProcess reads latin1 by default, so
+ // we have to force utf-8
+ QTextCodec *oldCodec = QTextCodec::codecForCStrings();
+ QTextCodec::setCodecForCStrings( QTextCodec::codecForName( "utf8" ) );
+
while( !proc.canReadLineStdout() )
qApp->processEvents();
@@ -135,4 +141,5 @@ const QValueList<KopeteLogEntry> KopeteX
}
+ QTextCodec::setCodecForCStrings( oldCodec );
proc.kill();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic