gnupg-2.0.9 uses wrong charset

Petr Uzel puzel at
Tue Jun 10 14:57:28 CEST 2008

Hi all,

I believe there is a bug in gnupg-2.0.9 that causes incorrect 
handling/conversions of non-latin characters on UTF terminals. 

nl_langinfo(CODESET) at utf8conv.c:208 should return console charset (in my 
case UTF-8), but instead returns ANSI_X3.4-1968 (~US-ASCII). So gpg then uses 
incorrect character set for iconv conversions resulting in 'weird' characters 
in UIDs.

This can be fixed by calling setlocale(LC_ALL, "") prior to nl_langinfo(). 
Since setlocale() is called from i18n_init() and nl_langinfo() from 
init_common_subsystems(), attached patch should IMHO fix the problem.

Best regards / s pozdravem

Petr Uzel, Packages maintainer
SUSE LINUX, s.r.o.                          e-mail: puzel at
Lihovarská 1060/12                          tel: +420 284 028 964
190 00 Prague 9                             fax: +420 284 028 951
Czech Republic                       
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnupg-2.0.9-langinfo.patch
Type: text/x-diff
Size: 544 bytes
Desc: not available
URL: </pipermail/attachments/20080610/55ae973a/attachment.patch>

More information about the Gnupg-devel mailing list