1. LWP syswrites out the header (with UTF8 flag set)is written 2. Crypt::SSLeay writes out encrypted header 3. LWP syswrites out the body 4. Crypt::SSLeay writes out the encrypted body but perhaps an internal buffer that it uses has the UTF8 flag set which corrupts the body.