Where you just want "a damned valid email and stop making my life
hard!":
Message['Subject']='Some text'
Yes. In which case I propose we guess the encoding as 1) ascii, 2)
utf-8, 3) wtf?
Well, we're talking about Python 3 here right? In which case the above
involves only unicode, so why d
On Mon, 13 Apr 2009 at 10:28, Barry Warsaw wrote:
On Apr 11, 2009, at 8:39 AM, Chris Withers wrote:
Barry Warsaw wrote:
> > > > message['Subject']
> The raw bytes or the decoded unicode?
A header object.
Yep. You got there before I did. :)
+1
> Okay, so you've picked one. Now how do y
On Apr 11, 2009, at 8:39 AM, Chris Withers wrote:
Barry Warsaw wrote:
>>> message['Subject']
The raw bytes or the decoded unicode?
A header object.
Yep. You got there before I did. :)
Okay, so you've picked one. Now how do you spell the other way?
str(message['Subject'])
Yes for uns
Barry Warsaw wrote:
>>> message['Subject']
The raw bytes or the decoded unicode?
A header object.
Okay, so you've picked one. Now how do you spell the other way?
str(message['Subject'])
bytes(message['Subject'])
Now, setting headers. Sometimes you have some unicode thing and
sometimes