Question about Tutorial-Unicode

Martin v. Löwis loewis at
Fri Sep 13 05:19:13 EDT 2002

Grzegorz Rumatowski <grzegorz.rumatowskiNOSPAM at> writes:

> I can't find any explanation. Mayby anyone of you?

That's a bug in the tutorial. You shouldn't use non-ASCII characters
in a Unicode literal in Python 2.2; this will only work in Python 2.3.

In the meantime, use u"\xe4\xf6\xfc" for that string, or one of the
other notations (\u00e4 or \N{LATIN CAPITAL LETTER A WITH DIAERESIS}).

The example works sometimes, but only in a terminal (not in IDLE), and
only if the terminal's encoding is Latin-1.


More information about the Python-list mailing list