| Summary: |
Wrong characters in user and group names in file tips then using UTF8 non english locale |
| Product: |
[I don't know] kde
|
Reporter: |
Aleksei Timofeyev <aleksei.timofeyev> |
| Component: |
general | Assignee: |
Unassigned bugs <unassigned-bugs-null> |
| Status: |
RESOLVED
UNMAINTAINED
|
|
|
| Severity: |
normal
|
CC: |
finex, mboquien
|
| Priority: |
NOR
|
Keywords: |
needs_verification |
| Version First Reported In: |
unspecified | |
|
| Target Milestone: |
--- | |
|
| Platform: |
openSUSE | |
|
| OS: |
Linux | |
|
|
Latest Commit:
|
|
Version Fixed/Implemented In:
|
|
|
Sentry Crash Report:
|
|
| |
Version: (using KDE KDE 3.5.7) Installed from: SuSE RPMs OS: Linux Im using Russian UTF8 locale and have user names and group names in Russian. Then i point mouse over files owned by this users or groups i have non readable names. I try to find there is problem. In KDE/3.5/kdelibs/kio/kio/kfileitem.cpp: QString KFileItem::user() const { if ( m_user.isEmpty() && m_bIsLocalURL ) { KDE_struct_stat buff; if ( KDE_lstat( QFile::encodeName(m_url.path( -1 )), &buff ) == 0) // get uid/gid of the link, if it's a link { struct passwd *user = getpwuid( buff.st_uid ); if ( user != 0L ) m_user = QString::fromLocal8Bit(user->pw_name); } } return m_user; } m_user = QString::fromLocal8Bit(user->pw_name); if user->pw_name in UTF8 we have wrong translation. i think we have to use QTextCodec to get right translation. QString KFileItem::group() const { #ifdef Q_OS_UNIX if (m_group.isEmpty() && m_bIsLocalURL ) { KDE_struct_stat buff; if ( KDE_lstat( QFile::encodeName(m_url.path( -1 )), &buff ) == 0) // get uid/gid of the link, if it's a link { struct group *ge = getgrgid( buff.st_gid ); if ( ge != 0L ) { m_group = QString::fromLocal8Bit(ge->gr_name); if (m_group.isEmpty()) m_group.sprintf("%d",ge->gr_gid); } else m_group.sprintf("%d",buff.st_gid); } } #endif return m_group; } m_group = QString::fromLocal8Bit(ge->gr_name); Same as for user() function.