This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sgala
Recipients
Date 2006-08-18.14:37:06
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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

History
Date User Action Args
2007-08-23 14:42:05adminlinkissue1542677 messages
2007-08-23 14:42:05admincreate