Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

rjbs (4671)

  (email not shown publicly)
AOL IM: RicardoJBSignes (Add Buddy, Send Message)
Yahoo! ID: RicardoSignes (Add User, Send Message)

I'm a Perl coder living in Bethlehem, PA and working Philadelphia. I'm a philosopher and theologan by training, but I was shocked to learn upon my graduation that these skills don't have many associated careers. Now I write code.

Journal of rjbs (4671)

Thursday August 28, 2008
01:30 PM

email::mime's horrible design problem

[ #37294 ]

...or at least the problem that came to light recently.

In a MIME message, you can use an "encoded-word" in the header to represent text that isn't 7-bit ASCII. For example:

From: =?utf-8?q?Ricardo_Juli=C3=ADn_Besteiro_Signes?= <>

Email::MIME's header method helpfully decodes these into character strings, so that when you say:

$email->header('from'); get Julián in there, not some MIME crap.

The header method is used to stringify the message. This means that when you load in a safe, 7-bit MIME message and then stringify it, you get an 8-bit (wide-character-having) string that can't be safely sent over plain old SMTP.

Maybe this wasn't a problem back when Email:: modules were more brazen about assuming that each others' internals would never change, and only became a problem when I started making them rely on methods rather than guts.

Either way, this is a pretty big problem. It means you can't reliably do:



The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.