Bug 69959 - non-latin1 real names displayed incorrectly
Summary: non-latin1 real names displayed incorrectly
Status: RESOLVED DUPLICATE of bug 59166
Alias: None
Product: kdm
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: kdm bugs tracker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-09 22:02 UTC by Marius Zalinauskas
Modified: 2008-05-19 17:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***