MailTemplates: more reliable encoding of headers
str.encode() first performs an implicit conversion to unicode using sys.getdefaultencoding(), which is usually 'ascii'. The 'isort' module changes the default encoding to utf-8, leading to UnicodeEncodeError instead of UnicodeDecodeError. Let's simplify all this.
Showing
Please register or sign in to comment