[issue1078919] email.Header (via add_header) encodes non-ASCII content incorrectly

2010-12-13 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Committed the default-to-utf8 fix in r87217, splitting up the tests as suggested by Barry. Backported to 3.1 in r87218. Updated the documentation for 2.7 in r87219. -- resolution: - fixed stage: patch review -

[issue1078919] email.Header (via add_header) encodes non-ASCII content incorrectly

2010-10-04 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: RDM, I wonder if it wouldn't be better (in email6) to use an instance to represent the 3-tuple instead? It might make for clearer client code, and would allow you to default things you might generally not care about. E.g. class

[issue1078919] email.Header (via add_header) encodes non-ASCII content incorrectly

2010-10-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: In addition, in 3.2 I will disallow non-ASCII parameter values unless they are specified in a three element tuple as in the example above. Why would the caller be required to choose an encoding while you could simply default to utf-8? There

[issue1078919] email.Header (via add_header) encodes non-ASCII content incorrectly

2010-10-03 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The compatibility argument is a fair point, and yes we could default to utf8 and no language. So that is probably a better solution than raising the error. -- ___ Python tracker

[issue1078919] email.Header (via add_header) encodes non-ASCII content incorrectly

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I don't believe either the example that other mailers reject or the one that they accept are in fact RFC compliant. Encoded words are not supposed to occur in (structured) MIME headers. The behavior observed is a consequence of all

[issue1078919] email.Header (via add_header) encodes non-ASCII content incorrectly

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Here is a patch. -- keywords: +patch stage: unit test needed - patch review Added file: http://bugs.python.org/file19114/add_header.patch ___ Python tracker rep...@bugs.python.org