By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,826 Members | 1,135 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,826 IT Pros & Developers. It's quick & easy.

problem with internationalized headers in email package

P: n/a
Hi.

From RFC 2047:
+ An 'encoded-word' MUST NOT appear in any portion of an 'addr-spec'.
+ An 'encoded-word' MUST NOT appear within a 'quoted-string'.
+ An 'encoded-word' MUST NOT be used in a Received header field.
+ An 'encoded-word' MUST NOT be used in parameter of a MIME
Content-Type or Content-Disposition field, or in any structured
field body except within a 'comment' or 'phrase'.
However (Python 2.5.2):
>>h = Header(u'Andrè <andre@localhost>')
h.encode()
'=?utf-8?b?QW5kcsOoIDxhbmRyZUBsb2NhbGhvc3Q+?='
I'm not sure if this can be considered a bug, but surely this is an
invalid header.

Thanks Manlio Perillo
Jun 29 '08 #1
Share this Question
Share on Google+
1 Reply

P: n/a
+ An 'encoded-word' MUST NOT appear in any portion of an 'addr-spec'.
+ An 'encoded-word' MUST NOT appear within a 'quoted-string'.
+ An 'encoded-word' MUST NOT be used in a Received header field.
+ An 'encoded-word' MUST NOT be used in parameter of a MIME
Content-Type or Content-Disposition field, or in any structured
field body except within a 'comment' or 'phrase'.
However (Python 2.5.2):
>>>h = Header(u'Andrè <andre@localhost>')
h.encode()
'=?utf-8?b?QW5kcsOoIDxhbmRyZUBsb2NhbGhvc3Q+?='
I'm not sure if this can be considered a bug, but surely this is an
invalid header.
Which of the conditions do you consider validated? It seems to me that
this would make a completely correct Subject header, for example.

Regards,
Martin
Jun 30 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.