in the current version because of python issue in other wordspymailcgi is really something of prototypedesigned to illustrate web scripting and system design concepts in this bookand serve as springboard for future work as isit' nowhere near as far along the software evolutionary scale as pymailgui stillwe'll see that pymailcgi' code factoring and reuse of existing modules allow it to implement much in surprisingly small amount of code new in this fourth edition (version in this fourth editionpymailcgi has been ported to run under python in additionthis version inherits and employs variety of new features from the mailtools moduleincluding mail header decoding and encodingmain mail text encodingthe ability to limit mail headers fetchedand more notablythere is new support for unicode and internationalized character sets as followsfor displayboth mail' main text and its headers are decoded prior to viewingper emailmimeand unicode standardstext is decoded per mail headers and headers are decoded per their content for sendsa mail' main texttext attachmentsand headers are all encoded per the same standardsusing utf- as the default encoding if required for replies and forwardsheaders copied into the quoted message text are also decoded for display note that this version relies upon web browsersability to display arbitrary kinds of unicode text it does not emit any sort of "metatag to declare encodings in the html reply pages generated for mail view and composition for instancea properly formed html document can often declare its encoding this waysuch headers are omitted here this is in part due to the fact that the mail might have arbitrary and even mixed types of text among is message and headerswhich might also clash with encoding in the html of the reply itself consider mail index list page that displays headers of multiple mailsbecause each mail' subject and from might be encoding in different character set (one russianone chineseand so on) single encoding declaration won' suffice (though utf- ' generality can often come to the rescueresolving such mixed character set cases is left to the browserwhich may ultimately require assistance from the user in the form of encoding choices such displays work in pymailgui because we pass decoded unicode text to the tkinter text widgetwhich handles arbitrary unicode code points well in pymailcgiwe're largely finessing this issue to keep this example short the pymailcgi website