From 1996da9e2f56abf969f50f5cd120a41d29984fcd 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 943f623..c1f3a1f 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