Closed ldidry closed 3 years ago
If charset is not specified when calling encode_mimewords, it uses ISO-8859-1 as default value, which may not be the correct encoding for the strings.
encode_mimewords
ISO-8859-1
This commit extracts the charset from Content-Type header and uses it in encode_mimewords call.
Content-Type
Coverage remained the same at 100.0% when pulling c4e1b1771b1f1288101ac5f25b1dc4a5a29d2889 on ldidry:fix-encode_mimewords-call into 8ee7dcca696dce4367cb1b00354751e9858effac on gryphonshafer:master.
If charset is not specified when calling
encode_mimewords
, it usesISO-8859-1
as default value, which may not be the correct encoding for the strings.This commit extracts the charset from
Content-Type
header and uses it inencode_mimewords
call.