From cc46d7b7d06ab3f4945a33bd62362af0f8d38b67 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 18 Apr 2016 22:38:17 +0200 Subject: [PATCH] call gpg with LANG=C to prevent decoding issues --- 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 33e4fb9d7..2743f7ae8 100644 --- a/src/common/gnupg.py +++ b/src/common/gnupg.py @@ -741,8 +741,10 @@ class GPG(object): si = STARTUPINFO() si.dwFlags = STARTF_USESHOWWINDOW si.wShowWindow = SW_HIDE + env = os.environ + env['LANG'] = 'C' return Popen(cmd, shell=False, stdin=PIPE, stdout=PIPE, stderr=PIPE, - startupinfo=si) + env=env, startupinfo=si) def _read_response(self, stream, result): # Internal method: reads all the stderr output from GPG, taking notice