On 2015-12-07, Terry Reedy wrote:
> On 12/7/2015 9:57 AM, Adam Funk wrote:
>> I'm trying to write an instance of email.message.Message, whose body
>> contains unicode characters, to a UTF-8 file. (Python 2.7.3 & 2.7.10
>> again.)
>
> The email package was rewritten for, I believe, 3.3. I believe
On 2015-12-08, dieter wrote:
> Adam Funk writes:
>
>> I'm trying to write an instance of email.message.Message, whose body
>> contains unicode characters, to a UTF-8 file. (Python 2.7.3 & 2.7.10
>> again.)
>>
>> reply = email.message.Message()
>> reply.set_charset('utf-8')
>> ... # s
Adam Funk writes:
> I'm trying to write an instance of email.message.Message, whose body
> contains unicode characters, to a UTF-8 file. (Python 2.7.3 & 2.7.10
> again.)
>
> reply = email.message.Message()
> reply.set_charset('utf-8')
> ... # set various headers
> reply.set_paylo
On 12/7/2015 9:57 AM, Adam Funk wrote:
I'm trying to write an instance of email.message.Message, whose body
contains unicode characters, to a UTF-8 file. (Python 2.7.3 & 2.7.10
again.)
The email package was rewritten for, I believe, 3.3. I believe it
should handle unicode email encoded as ut
On 2015-12-07, Adam Funk wrote:
> I'm trying to write an instance of email.message.Message, whose body
> contains unicode characters, to a UTF-8 file. (Python 2.7.3 & 2.7.10
> again.)
>
> reply = email.message.Message()
> reply.set_charset('utf-8')
> ... # set various headers
> re
I'm trying to write an instance of email.message.Message, whose body
contains unicode characters, to a UTF-8 file. (Python 2.7.3 & 2.7.10
again.)
reply = email.message.Message()
reply.set_charset('utf-8')
... # set various headers
reply.set_payload('\n'.join(body_lines) + '\n')