Bug 69959

Summary: non-latin1 real names displayed incorrectly
Product: [Unmaintained] kdm Reporter: Marius Zalinauskas <mariusz>
Component: generalAssignee: kdm bugs tracker <kdm-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Marius Zalinauskas 2003-12-09 22:02:20 UTC
Version:            (using KDE KDE 3.1.4)
Installed from:    Debian stable Packages
Compiler:          gcc 2.95.4 
OS:          Linux

Displaying non-latin1 real names in the KDM login screen works incorrectly.

Try this: enter some UTF-8 data in user's GECOS field, restart KDM. You will not see any non-latin1 character, only Ž, Ų, ÅŖ, etc.

When real names contain 8bit  characters from, for example latin7, they are translated to latin1 equivalents (aogonek to agrave, zcaron to thorn, etc).

The problem is in KGreeter::insertUser(UserListView*, const QImage&,const QString&, struct passwd*) in kdm/kfrontend/kgreeter.cpp. User's real name is extracted on line:
  QString realname = QFile::decodeName( ps->pw_gecos );
but there should be something like:
  QTextCodec* codec = QTextCodec::codecForName(CODESET);
  QString realname = codec->toUnicode(ps->pw_gecos);
where CODESET stands for UTF-8, LATIN7, KOI8-R, etc.
Comment 1 Oswald Buddenhagen 2003-12-09 22:15:07 UTC

*** This bug has been marked as a duplicate of 59166 ***