[Haskell-cafe] Question: mime-mail and base64 encoding

Nicolas Pouillard nicolas.pouillard at gmail.com
Tue Dec 7 14:36:44 CET 2010


On Mon, 6 Dec 2010 22:21:35 -0800, Nathan Howell <nathan.d.howell at gmail.com> wrote:
> On Mon, Dec 6, 2010 at 8:42 PM, Michael Snoyman <michael at snoyman.com> wrote:
> > The request is to make both the HTML and plain text parts use base64
> > encoding by default. This *seems* to me to make a lot of sense, since
> > it will ensure that your message arrives exactly as you intended it,
> > and will ensure that any non-ASCII code points don't get killed
> > somewhere along the way. On the other hand, I'm not sure what client
> > support is like for base-64 encoding. Don't we need to leave *some*
> > form of non-encoded data for less sophisticated email clients?
> 
> The way I've seen it done before was to:
> - calculate the size of the body in quoted-printable and base64 encoding
> - select the smaller encoded form of the two
> 
> quoted-printable is fairly human readable. This strategy also works
> for encoding headers, particularly Subject: lines (substituting
> q-encoding for qp).

I would prefer quoted-printable as well, at least for the text alternative.

-- 
Nicolas Pouillard
http://nicolaspouillard.fr



More information about the Haskell-Cafe mailing list