problems appears to require full redesign to be fairit' substantial problem email has historically been oriented toward singlebyte ascii textand generalizing it for unicode is difficult to do well in factthe same holds true for most of the internet today--as discussed elsewhere in this ftppopsmtpand even webpage bytes fetched over http pose the same sorts of issues interpreting the bytes shipped over networks as text is easy if the mapping is one-toonebut allowing for arbitrary unicode encoding in that text opens pandora' box of dilemmas the extra complexity is necessary todaybutas email attestscan be daunting task franklyi considered not releasing this edition of this book until this package' issues could be resolvedbut decided to go forward because new email package may be years away (two python releasesby all accountsmoreoverthe issues serve as case study of the types of problems you'll run into in the real world of large-scale software development things change over timeand program code is no exception insteadthis book' examples provide new unicode and internationalization support but adopt policies to work around issues where possible programs in books are meant to be educationalafter allnot commercially viable given the state of the email package that the examples depend onthoughthe solutions used here might not be completely universaland there may be additional unicode issues lurking to address the futurewatch this book' website (described in the prefacefor updated notes and code examples if/when the anticipated new email package appears herewe'll work with what we have the good news is that we'll be able to make use of email in its current form to build fairly sophisticated and full-featured email clients in this book anyhow it still offers an amazing number of toolsincluding mime encoding and decodingmessage formatting and parsinginternationalized headers extraction and constructionand more the bad news is that this will require handful of obscure workarounds and may need to be changed in the futurethough few software projects are exempt from such realities because email' limitations have implications for later email code in this booki' going to quickly run through them in this section some of this can be safely saved for later referencebut parts of later examples may be difficult to understand if you don' have this background the upside is that exploring the package' limitations here also serves as vehicle for digging bit deeper into the email package' interfaces in general parser decoding requirement the first unicode issue in python ' email package is nearly showstopper in some contextsthe bytes strings of the sort produced by poplib for mail fetches must be decoded to str prior to parsing with email unfortunatelybecause there may not be enough information to know how to decode the message bytes per unicodesome clients of this package may need to be generalized to detect whole-message encodings emailparsing and composing mail content