Skip to content

Tag: character-encoding

Problem with a mail message created by a parser

If I create a message this way (using real addresses, of course): I can successfully send it using smtplib. No problem with the Unicode characters in the body. The received message has these headers: If I try to create the same message in this alternative way: I can’t send it. send_message() from smtpli…

Python – Unicode De/Encode

How can I pass all the content from making a db-input(s1), loading it from there (s2) and pass it correctly back-formated to the file? Log: EDIT: I am working on windows. Answer The problem is that you open the file in text mode, but don’t specify the encoding. In that case the system default encoding i…