Entry
Using non-ASCII characters like German umlauts gives errors in IDLE. Is there a solution?
Sep 23rd, 2001 15:54
Gerhard Haering,
You have to set Python's default encoding to the character set you
use. For countries in Central Europe, this would be "iso-8859-1", for
Eastern Europe, Russia, Asia, etc. that's a different character set.
You can change Python's default encoding by putting a file
"sitecustomize.py" somewhere in Python's search path.
A possible place on Unix is the site-packages directory of your Python
installation.
A possible place on Windows is the directory python.exe is in
(c:\Python21 by default).
Put the following two lines in the sitecustomize.py file:
import sys
sys.setdefaultencoding("iso-8859-1")
and change the default encoding ("iso-8859-1") to yours.