At 10:11 -0400 04/13/2009, Barry Warsaw wrote:

>On Apr 10, 2009, at 11:08 AM, James Y Knight wrote:
>
>> Until you write a parser for every header, you simply cannot decode
>> to unicode. The only sane choices are:
>> 1) raw bytes
>> 2) parsed structured data
>
>The email package does not need a parser for every header, but it
>should provide a framework that applications (or third party
>libraries) can use to extend the built-in header parsers.  A bare
>minimum for functionality requires a Content-Type parser.  I think the
>email package should also include an address header (Originator,
>Destination) parser, and a Message-ID header parser.  Possibly
>others.  The default would probably be some unstructured parser for
>headers like Subject.

I think the email package should have a parser for every header.  All the
headers defined in normal mail RFCs should have their own parser, and there
would be a default parser for unhandled headers, probably the Unstructured
parser.  Users could add their own, probably by importing something module
that knew how to add its parsing to the email package parsers.
-- 
____________________________________________________________________
TonyN.:'                       <mailto:tonynel...@georgeanelson.com>
      '                              <http://www.georgeanelson.com/>
_______________________________________________
Email-SIG mailing list
Email-SIG@python.org
Your options: 
http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com

Reply via email to