fix title decoding error. unknown-8bit charset

This commit is contained in:
Yax 2022-01-05 20:01:56 +01:00
parent f368033559
commit 61d0891b47
2 changed files with 18 additions and 1 deletions

View file

@ -121,7 +121,7 @@ def _email_non_ascii_to_uft8(string):
# characters inside e-mail in a way that wont confuse e-mail servers
subject = ""
for v, charset in email.header.decode_header(string):
if charset is None:
if charset is None or charset == 'unknown-8bit':
if type(v) is bytes:
v = v.decode()
subject = subject + v