in reply to Decoding MIME headers with URI::Escape for extended character set

Your best bet may be to uuencode the data before writing it and uudecode the data after reading it. Look at pack("u",...) and unpack("u",...) (I normally have to mess with string lengths when I do it).

This will ensure that all data is encoded into 7 bit strings

  • Comment on Re: Decoding MIME headers with URI::Escape for extended character set