Gabriel B. wrote:
> what does a string became when it's decoded?
>
> I mean, it must be encoded in something, right?
Unicode, for encodings like latin-1 or utf-8. A few special cases like
str.decode('string_escape') yield byte strings again.
Kent
--
http://mail.python.org/mailman/listinfo/pyth
2006/2/25, Sybren Stuvel <[EMAIL PROTECTED]>:
> 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
what does a string be
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
Finally I have the working version,It looks like this
#
from email.Message import Message
from email.MIMEText import MIMEText
from email.Header import Header
import smtplib
msg = Message()
Body='Rídících Márinka a kolák Kája
Marík'.decode('utf8').encode('windows-1250')# I use the text
Lad enlightened us with:
> and can give me an example of Python code that can send such
> email??
Not really, but I'm sure this will help you. In fact, my last name has
an umlaut on the 'u'. This is the From header in my emails, encoded in
Latin-1:
From: Sybren =?iso-8859-1?Q?St=FCvel?= <[EMAIL
Sybren,
and can give me an example of Python code that can send such email??
--
http://mail.python.org/mailman/listinfo/python-list
Lad enlightened us with:
> Can anyone give an example how to send email with non-ascii
> characters( both in subject and body). I would like to use
> windows-1250 code page
I'd use Latin-1 or UTF-8, since they are both cross-platform instead
of windows-specific...
Sybren
--
The problem with the