Decode the subject using its real given charset
This commit is contained in:
parent
6c685fb181
commit
c26f810527
|
@ -44,7 +44,7 @@ def remove_spam_flag(subject):
|
|||
# Mystical, sometimes it's bytes, sometimes str, handle that
|
||||
item_zero = item[0]
|
||||
if type(item_zero) is bytes:
|
||||
item_zero = item_zero.decode(encoding_result['encoding'])
|
||||
item_zero = item_zero.decode(item[1])
|
||||
result += (
|
||||
item_zero.replace('*****SPAM***** ', ''),
|
||||
item[1]), # Note it's a tuple
|
||||
|
|
Loading…
Reference in New Issue