latin1 encoding as default?

Martin v. Löwis martin at v.loewis.de
Sun May 25 14:00:57 EDT 2003


Helmut Jarausch <jarausch at skynet.be> writes:

> I have difficulties. Here my output
> 
> Python 2.3b1+ (#1, May 24 2003, 15:02:32)
> [GCC 3.2.3] on linux2
> Type "copyright", "credits" or "license" for more information.
> IDLE 0.8 -- press F1 for help
>  >>> # -*- coding: iso-8859-1 -*-
> 
>  >>> print "Ätsch"
> Unsupported characters in input
>  >>>

Ah, interactive mode. PEP 263 is about source code (files) only; it
does not apply to interactive mode; this is for further study. In
interactive mode, the "terminal encoding" should be used. On Linux,
IDLE derives the terminal encoding from the locale. What is your
locale? What is the output of

>>> import locale
>>> locale.setlocale(locale.LC_ALL,"")
# suppressed
>>> locale.nl_langinfo(locale.CODESET)
'ISO-8859-15'

Regards,
Martin




More information about the Python-list mailing list