aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/plaintext.py
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/plaintext.py')
-rwxr-xr-xcontrib/plaintext.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/plaintext.py b/contrib/plaintext.py
index 3a326791..522055bf 100755
--- a/contrib/plaintext.py
+++ b/contrib/plaintext.py
@@ -11,6 +11,7 @@ ansi_escape = re.compile(r'\x1B\[[0-?]*[ -/]*[@-~]')
quote_prefix_re = re.compile(r"On .*, .* wrote:")
quote_re = re.compile(r">+")
+sys.stdin.reconfigure(encoding='utf-8', errors='ignore')
mail = sys.stdin.read().replace("\r\n", "\n")
mail = ansi_escape.sub('', mail)