newbie: unicode

Jan Weingärtner jweingart at gmx.de
Mon Jan 6 23:55:05 CET 2003


Hi.

I'm just beginning to learn Python.
My tutorial gives an example how to convert a unicode
string to utf-8:

>>> u"äöü".encode('utf-8')
'\xc3\xa4\xc3\xb6\xc3\xbc'

If i try to execute this command, i get the error message:
"UnicodeError: ASCII encoding error: ordinal not in range(128)"

Why?

thanks and regards,
Jan






More information about the Python-list mailing list