On Fri, Aug 31, 2012 at 12:53 PM, R. David Murray <rdmur...@bitdance.com> wrote:
> On Fri, 31 Aug 2012 12:18:05 -0400, Daniel Holth <dho...@gmail.com> wrote:
>> Some edits to include / and remove rfc822 again. What is the right
>> email.policy.Policy()?
>
> When I discussed using email to parse metadata with Tarek a long time
> ago, I thought he was going to move to using a delimiter-substitution
> algorithm to encode and recover the line breaks.  Perhaps that discussion
> wasn't in this same context, but I thought it was.  If you did that,
> then 'SMTP' would be the correct policy for RFC2822/5322.
>
> But that isn't really going to work for this use case, even with the above
> hack.  As Martin pointed out, RFC2822 does not allow utf-8 in the values.

Thanks. For the time being I am happily using the
surrogateescape/bytesgenerator hack and it preserves UTF-8 and
linebreaks. I don't have a strong opinion about the line continuation
policy; I do not have code that relies on parsing the long description
from PKG-INFO files.
_______________________________________________
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