On Sep 16, 2010, at 09:34 PM, R. David Murray wrote:

>Say we start with this bytes input:
>
>    To: Glyph Lefkowitz <gl...@twistedmatrix.com>
>    From: "R. David Murray" <rdmur...@bitdance.com>
>    Subject: =?utf-8?q?p=F6stal?=
>
>    A simple message.
>
>Part of the responsibility of the email module is to provide that
>in text form on demand, so the application gets:
>
>    To: Glyph Lefkowitz <gl...@twistedmatrix.com>
>    From: "R. David Murray" <rdmur...@bitdance.com>
>    Subject: pöstal
>
>    A simple message.
>
>Now the application allows the user to do some manipulation of that,
>and we have:
>
>    To: "R. David Murray" <rdmur...@bitdance.com>
>    From: Glyph Lefkowitz <gl...@twistedmatrix.com>
>    Subject: Re: pöstal
>
>    A simple reply.

And of course, what happens if the original subject is in one charset and the
prefix is in an incompatible one?  Then you end up with a wire format of two
RFC 2047 encoded words separated by whitespace.  You have to keep those chunks
separate all the way through to do that properly.  (I know RDM knows this. :)

>But I *am* open to being convinced otherwise.  If everyone hates the
>BytesMessage/StringMessage API design, then that should certainly not
>be what we implement in email.

Just as a point of order, to the extent that we're discussing generic
approaches to similar problems across multiple modules, it's okay that we're
having this discussion on python-dev.  But the email-sig has put in a lot of
work on specific API and implementation designs for the email package, so any
deviation really needs to be debated, discussed, and decided there.

-Barry

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to