string encoding - how to make it work

Martin v. Löwis loewis at informatik.hu-berlin.de
Wed Jul 17 09:16:53 EDT 2002


"Henry Baumgartl" <h.baumgartl at chello.NOSPAM.nl> writes:

> Still, what i can't get my head around is that when entering short cut
> generated extended characters into, for instance, IDLE it works without any
> problem.
> 
> It is only when i try to save it that the Error is raised.

That's an independent IDLE problem. IDLE is inherently a Unicode
editor, as the underlying Toolkit uses Unicode. When saving the file,
IDLE needs to know what encoding to use, but doesn't. IDLE uses the
system default encoding, which is 'ascii'.

As a work-around, you can change the system default encoding, see the
FAQ. In future Python versions, you can indicate the desired source
encoding in the source file itself.

Regards,
Martin




More information about the Python-list mailing list