From 4fcddb67386ea451bcdc1808ca5d2ed290d6fa4b Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 30 Jan 2008 07:56:02 +0000 Subject: [PATCH] [nijel] unescape non-ascii chars in the output of GnuPG. fixes #3709 --- src/common/GnuPG.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/GnuPG.py b/src/common/GnuPG.py index 4e281c71d..72c34a8f9 100644 --- a/src/common/GnuPG.py +++ b/src/common/GnuPG.py @@ -193,8 +193,10 @@ if gajim.HAVE_GPG: sline = line.split(':') if (sline[0] == 'sec' and secret) or \ (sline[0] == 'pub' and not secret): + # decode escaped chars + name = eval('"' + sline[9].replace('"', '\\"') + '"') # make it unicode instance - keys[sline[4][8:]] = helpers.decode_string(sline[9]) + keys[sline[4][8:]] = helpers.decode_string(name) return keys try: proc.wait() except IOError: pass