From dac7c0af8dc95dce85ec8a1086c3ab15b63e2cc4 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 12 Nov 2019 23:42:59 +0100 Subject: [PATCH] remail/pipe: Allow UTF-8 for incoming mails Similar to mails in files, this needs to be explicitly enabled. Signed-off-by: Thomas Gleixner --- remail/remaild.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/remail/remaild.py b/remail/remaild.py index 6912741..cdc7acf 100644 --- a/remail/remaild.py +++ b/remail/remaild.py @@ -373,7 +373,8 @@ class remaild(object): if not self.enabled: return 1 - msg = message_from_file(sys.stdin) + policy = EmailPolicy(utf8=True) + msg = message_from_file(sys.stdin, policy=policy) return self.process_msg(msg) # The runner