PyDocs

Nav

Internet Data Handling

Message.set_charset

  • Message.set_charset(charset)
Set the charset of the payload to a given character set.

charset can be a Charset instance, a string naming a character set, or
None.  If it is a string it will be converted to a Charset instance.
If charset is None, the charset parameter will be removed from the
Content-Type field.  Anything else will generate a TypeError.

The message will be assumed to be of type text/* encoded with
charset.input_charset.  It will be converted to charset.output_charset
and encoded properly, if needed, when generating the plain text
representation of the message.  MIME headers (MIME-Version,
Content-Type, Content-Transfer-Encoding) will be added as needed.
0 Examples
No examples for email.message/Message.set_charset.
See Also
No see-alsos for email.message/Message.set_charset
0 Notes
No notes for Message.set_charset