from the raw message headers as we learned in and the underlying tkinter toolkit generally renders decoded str better than raw bytes so farwe've displayed internationalized emailsbut pymailgui allows us to send them as welland handles any encoding tasks implied by the text content figure - shows the result of running replies and forwards to the russian language emailwith the to address changed to protect the innocent headers in the view window were decoded for displayencoded when sentand decoded back again for displaytext parts in the mail body were similarly decodedencodedand re-decoded along the way and headers are also decoded within the ">quoted original text inserted at the end of the message and finallyfigure - shows portion of the raw text of the russian language reply message that appears in the lower right of the formatted view of figure - againdouble-click to see these details live notice how both headers and body text have been encoded per email and mime standards as configuredthe body text is always mime encoded to utf- when sent if it fails to encode as asciithe default setting in the mailconfig module other defaults can be used if desired and will be encoded appropriately for sendsin facttext that won' work in the full text of email is mime encoded the same way as binary parts such as images this is also true for non-internationalized character sets--the text part of message written in english with any non-ascii quotesfor examplewill be utf- and base encoded in the same way as the message in figure - and assume that the recipient' email reader will decode (any reasonable modern email client willthis allows nonascii text to be embedded in the full email text sent pymailgui demo