From a91bbaee9eb419dc985d9f5c3689831c8aa75c1e Mon Sep 17 00:00:00 2001 From: erik Date: Mon, 09 Jul 2007 22:06:00 +0000 Subject: Fix for opie bug 1719. This should make opie-irc play nicer with utf-8. Patches were culled from OE. Thanks to whoever the original patch author was. --- (limited to 'noncore/net/opieirc/ircconnection.cpp') diff --git a/noncore/net/opieirc/ircconnection.cpp b/noncore/net/opieirc/ircconnection.cpp index 88e63f7..fb7e168 100644 --- a/noncore/net/opieirc/ircconnection.cpp +++ b/noncore/net/opieirc/ircconnection.cpp @@ -29,7 +29,8 @@ void IRCConnection::sendLine(QString line) { while((line.right(1) == "\n") || (line.right(1) == "\r")) line = line.left(line.length() - 1); line.append("\r\n"); - m_socket->writeBlock(line, line.length()); + QCString uline = line.utf8(); + m_socket->writeBlock(uline, uline.length()); } void IRCConnection::sendCTCPReply(const QString &nickname, const QString &type, const QString &args) { @@ -77,7 +78,7 @@ void IRCConnection::login() { /* Called when data arrives on the socket */ void IRCConnection::dataReady() { while(m_socket->canReadLine()) { - IRCMessage message(m_socket->readLine()); + IRCMessage message(QString::fromUtf8(m_socket->readLine())); if (!m_loggedIn && message.isNumerical() && message.commandNumber() == 1) { /* Now autojoin all channels specified inside the server profile */ QStringList channels = QStringList::split(QChar(','), m_server->channels()); -- cgit v0.9.0.2