aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-06-10 17:40:36 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-06-10 17:41:17 -0400
commit1996da9e2f56abf969f50f5cd120a41d29984fcd (patch)
tree20dd67e415188887ee599d2f20fa590633b2fec5
parentca902b59c3d135ddbd64d9fba9fa3ef995555f0c (diff)
downloadb4-1996da9e2f56abf969f50f5cd120a41d29984fcd.tar.gz
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 <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py1
1 files changed, 1 insertions, 0 deletions
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