Changeset - 34ec0df769f1
[Not reviewed]
0 1 0
Arnt Gulbrandsen - 13 years ago 2012-07-17 14:53:00
arnt@gulbrandsen.priv.no
avoid WTF-8.

what arrives from XMPP is already UTF-8 encoded, so applying UTF-8 again
produces somewhat unfortunate results.

this line is not always necessary. before this change, the code was
dependent on the locale.
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
backends/libcommuni/singleircnetworkplugin.cpp
Show inline comments
 
@@ -43,24 +43,25 @@ void SingleIRCNetworkPlugin::handleLoginRequest(const std::string &user, const s
 
	if (m_sessions[user] != NULL) {
 
		LOG4CXX_WARN(logger, user << ": Already logged in.");
 
		return;
 
	}
 
	LOG4CXX_INFO(logger, user << ": Connecting " << m_server << " as " << legacyName);
 

	
 
	MyIrcSession *session = new MyIrcSession(user, this);
 
	session->setUserName(FROM_UTF8(legacyName));
 
	session->setNickName(FROM_UTF8(legacyName));
 
	session->setRealName(FROM_UTF8(legacyName));
 
	session->setHost(FROM_UTF8(m_server));
 
	session->setPort(6667);
 
	session->setEncoding( "utf-8" );
 

	
 
	if (!password.empty()) {
 
		std::string identify = m_identify;
 
		boost::replace_all(identify, "$password", password);
 
		boost::replace_all(identify, "$name", legacyName);
 
		session->setIdentify(identify);
 
	}
 

	
 
	session->open();
 

	
 
	m_sessions[user] = session;
 
}
0 comments (0 inline, 0 general)