How to send an email with non-ascii characters in Python

Sybren Stuvel sybrenUSE at YOURthirdtower.com.imagination
Sat Feb 25 06:53:25 EST 2006


Lad enlightened us with:
> Body='Rídících Márinka a Školák Kája
> Marík'.decode('utf8').encode('windows-1250')# I use the text written
> in my editor with utf-8 coding, so first I decode and then encode to
> windows-1250

Why would you do that? What's the advantage of windows-1250?

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
                                             Frank Zappa



More information about the Python-list mailing list