[ python-Bugs-1542677 ] IDLE shell doesn't accept non ascii char input

SourceForge.net noreply at sourceforge.net
Fri Aug 18 16:37:06 CEST 2006


Bugs item #1542677, was opened at 2006-08-18 16:37
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1542677&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: IDLE
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Santiago Gala (sgala)
Assigned to: Nobody/Anonymous (nobody)
Summary: IDLE shell doesn't accept non ascii char input

Initial Comment:
in bug 1528802 ( see
https://sourceforge.net/tracker/index.php?func=detail&aid=1528802&group_id=5470&atid=105470
) , I noticed that idle shell behaviour WRT
non-ascii chars was different than python console, and
possibly broken.

For example, IDLE produces:

>>> print u"á"
á
>>> print len(u"á")
2
>>> print "á"
á
>>> print len("á")
2

-------
a python shell (gnome-terminal):

>>> print u"á"
á
>>> print len(u"á")
1
>>> print "á"
á
>>> print len("á")
2

Both are using es_ES.utf-8 system encoding.

IDLE can manage unicode, it is just input that gives
problems:

>>> import unicodedata
>>> print unicodedata.lookup("LATIN SMALL LETTER A
WITH ACUTE")
á
>>> print len(unicodedata.lookup("LATIN SMALL
LETTER A WITH
ACUTE"))
1

Not that I like that much the violation of the least
surprising behaviour that python console offers with
non-ascii letters, but at least some internal
consistency would be great, until python 3000 gives us
true strings.

I'm using python 2.5 (svn trunk) --with-unicode=ucs4



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

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


More information about the Python-bugs-list mailing list