From: Manuel Nickschas Date: Wed, 22 Apr 2009 13:39:50 +0000 (+0200) Subject: Always treat the GECOS real name field as UTF8-encoded X-Git-Tag: 0.5-rc1~214 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=137e21913092a372c6a35042150e918000631b0c Always treat the GECOS real name field as UTF8-encoded Thanks to Gökçen Eraslan and H. İbrahim Güngör for this. --- diff --git a/src/common/identity.cpp b/src/common/identity.cpp index 1978ebe9..0569178a 100644 --- a/src/common/identity.cpp +++ b/src/common/identity.cpp @@ -22,6 +22,7 @@ #include #include +#include #ifdef Q_OS_MAC # include @@ -126,7 +127,7 @@ QString Identity::defaultRealName() { QString realName; struct passwd *pwd = getpwuid(getuid()); if(pwd) - realName = pwd->pw_gecos; + realName = QString::fromUtf8(pwd->pw_gecos); if(!realName.isEmpty()) return realName; else