Bug 211399

Summary: KGpg cannot handle latin/non-ascii/special characters in Name
Product: [Applications] kgpg Reporter: Jonathan Thomas <echidnaman>
Component: generalAssignee: Rolf Eike Beer <kde>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Jonathan Thomas 2009-10-22 01:50:06 UTC
Version:           2.2.1 (using KDE 4.3.2)
OS:                Linux
Installed from:    Ubuntu Packages

This is a forwarding of https://launchpad.net/bugs/293177 , which I can confirm still occurs with KDE 4.3.2.

Original report text:
"In Intrepid, if I try to create a key with my name "Björn Lindh" from KGPG the name is saved as Bj*unreadable chars*rn Lindh.

Console output says:
uid Bj\xf6\x72n Lindh

Creating the key from console makes the "ö" show up fine."

This picture displaying the problem was attached to the downstream bug: http://launchpadlibrarian.net/26172708/snapshot034.png
Comment 1 Rolf Eike Beer 2009-10-25 18:26:54 UTC
Which locale are you using?
Comment 2 Jonathan Thomas 2009-10-25 18:33:25 UTC
jonathan@jonathan-desktop:~$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
jonathan@jonathan-desktop:~$


I would like to note that the name looks OK in the "New key pair created" dialog, but opening up the key from the list afterwards shows the bug as seen in the screenshot.
Comment 3 Rolf Eike Beer 2009-10-25 19:07:20 UTC
The "new key pair created" dialog shows the string from within the application, not the one read back from the key itself.

I can reproduce this here so I'll have a look on this.
Comment 4 Rolf Eike Beer 2009-10-25 21:18:22 UTC
SVN commit 1040200 by dakon:

properly encode what is sent do gpg processes

-don't destroy UTF8 encoding
-use QByteArray::number() instead of QString::number().toAscii()
-remove bogus Q_UNUSED()

CCBUG:211399

 M  +1 -1      kgpgaddphoto.cpp  
 M  +2 -2      kgpgadduid.cpp  
 M  +1 -1      kgpgchangeexpire.cpp  
 M  +1 -1      kgpgchangetrust.cpp  
 M  +0 -2      kgpgexport.cpp  
 M  +6 -5      kgpggeneratekey.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1040200
Comment 5 Rolf Eike Beer 2009-10-25 21:19:05 UTC
SVN commit 1040201 by dakon:

properly encode what is sent do gpg processes

-don't destroy UTF8 encoding
-use QByteArray::number() instead of QString::number().toAscii()
-remove bogus Q_UNUSED()

BUG:211399

backport of r1040200


 M  +1 -1      kgpgaddphoto.cpp  
 M  +2 -2      kgpgadduid.cpp  
 M  +1 -1      kgpgchangeexpire.cpp  
 M  +1 -1      kgpgchangetrust.cpp  
 M  +6 -5      kgpggeneratekey.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1040201