summaryrefslogtreecommitdiff
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:55 -0400
commit23b8948263478946a08095e4b5e4629e926dd4d9 (patch)
treee1be187e5c3735a212e9977dceca074ec02f56f6
parente91425dad88988afa4959f4462c90bf06229664b (diff)
downloadb4-23b8948263478946a08095e4b5e4629e926dd4d9.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 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