[Python-bugs-list] [ python-Bugs-527022 ] raw_input non-ascii failure on Linux/KDE

noreply@sourceforge.net noreply@sourceforge.net
Thu, 07 Mar 2002 08:32:16 -0800


Bugs item #527022, was opened at 2002-03-07 16:31
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=527022&group_id=5470

Category: IDLE
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Alex Martelli (aleax)
Assigned to: Nobody/Anonymous (nobody)
Summary: raw_input non-ascii failure on Linux/KDE

Initial Comment:
With default encoding left as 'ascii', interactively
doing x=raw_input('say something funny: ') and 
entering a non-ascii character seems to work OK
in a textmode interactive interpreter (Linux 
Mandrake
8.1 and KDE Console, Win98) and on IDLE on Win98.  
On
IDLE with Linux Mandrake 8.1 and KDE, though:

Python 2.2 (#1, Dec 23 2001, 20:09:01) 
[GCC 2.96 20000731 (Mandrake Linux 8.1 
2.96-0.62mdk)] on linux2
Type "copyright", "credits" or "license" for more 
information.
IDLE 0.8 -- press F1 for help
>>> palö
UnicodeError: ASCII encoding error: ordinal not in 
range(128)
>>> x=raw_input('say something funny: ')
say something funny: palö
Traceback (most recent call last):
  File "<pyshell#1>", line 1, in ?
    x=raw_input('say something funny: ')
TypeError: object.readline() returned non-string
>>> 

This came up on python-help (not sure what platform 
the querant was using), I originally didn't think of
it as a bug and told the querant to change the 
default encoding in site.py, but Skip doubted that
was OK and asked on python-list, where Martin said:

"In IDLE, I'd say there is a bug somewhere. I'm not 
sure what ... If there is a bug, it is ok to work 
around it with any means you find.
It would be better to report it to SF, though."

so here it is, the SF bug report as requested.


Alex


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=527022&group_id=5470