From 23b8948263478946a08095e4b5e4629e926dd4d9 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Wed, 10 Jun 2020 17:40:36 -0400 Subject: Fix regression with oddball charsets Fix the same bug we've fixed before in another place -- when charset is set to oddball value like charset=a, fallback to utf-8 and hope for the best. Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/b4/__init__.py b/b4/__init__.py index 85073e2..641cc70 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -851,6 +851,7 @@ class LoreMessage: # Whatever, we'll use utf-8 and hope for the best payload = payload.decode('utf-8', errors='replace') part.set_param('charset', 'utf-8') + self.charset = 'utf-8' if self.body is None: self.body = payload continue -- cgit v1.2.3