diff --git a/src/common/gpg.py b/src/common/gpg.py
index af00d89a97fedfd7710db9c3588ec44e93253466..5a29a69fa4f179a0d0739b42fd3f3dc5bccd6bd4 100644
--- a/src/common/gpg.py
+++ b/src/common/gpg.py
@@ -31,6 +31,7 @@ if HAVE_GPG:
     class GnuPG(gnupg.GPG):
         def __init__(self, use_agent=False):
             gnupg.GPG.__init__(self)
+            gnupg.GPG.decode_errors = 'replace'
             self.passphrase = None
             self.use_agent = use_agent
             self.always_trust = False