[Idle-dev] Re: [Tutor] Help concerning raw_input urgently needed!

Gregor Lingl glingl@aon.at
Mon, 02 Sep 2002 19:19:29 +0200


Guido van Rossum schrieb:

>>I think the problem is that Tcl/Tk use Unicode these days,
>>and Python defaults to ISO8859-1.
>>    
>>
>
>That's not true.
>
>  
>
>>Thus your umlaut is ok for raw_input in python proper. In IDLE, the
>>characters are recieved by Tk, and translated from Unicode. That
>>fails on any non-ASCII value, since these are ambiguous unless a
>>code page is supplied.
>>    
>>
>
>Try the IDLE from current CVS.  AFAIK the Unicode issues have been
>fixed there.
>
>--Guido van Rossum (home page: http://www.python.org/~guido/)
>  
>
No, the problem addressed has not been fixed there.
I don't know, if Unicode issues are involved, but anyway we find:

Python 2.2.1 (#34, Apr  9 2002, 19:34:33) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
IDLE Fork 0.8 -- press F1 for help
 >>> a = raw_input("Hä? ")
Hä? Tschüs
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in ?
    a = raw_input("Hä? ")
TypeError: object.readline() returned non-string
 >>>

Gregor