[nijel] unescape non-ascii chars in the output of GnuPG. fixes #3709

This commit is contained in:
Yann Leboulanger 2008-01-30 07:56:02 +00:00
parent e0e86b8f91
commit 4fcddb6738
1 changed files with 3 additions and 1 deletions

View File

@ -193,8 +193,10 @@ if gajim.HAVE_GPG:
sline = line.split(':') sline = line.split(':')
if (sline[0] == 'sec' and secret) or \ if (sline[0] == 'sec' and secret) or \
(sline[0] == 'pub' and not secret): (sline[0] == 'pub' and not secret):
# decode escaped chars
name = eval('"' + sline[9].replace('"', '\\"') + '"')
# make it unicode instance # make it unicode instance
keys[sline[4][8:]] = helpers.decode_string(sline[9]) keys[sline[4][8:]] = helpers.decode_string(name)
return keys return keys
try: proc.wait() try: proc.wait()
except IOError: pass except IOError: pass