fredrik at pythonware.com
Tue Jan 7 09:01:39 CET 2003
Jan Weingärtner wrote:
> 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')
> If i try to execute this command, i get the error message:
> "UnicodeError: ASCII encoding error: ordinal not in range(128)"
how are you executing that command?
there's no way that piece of code can give that error message,
as long as ">>>" is an ordinary Python 2.x interpreter prompt, and
you haven't been hacking around in the site configuration files...
on the other hand,
does give you that message.
More information about the Python-list