[issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell

Naoki INADA report at bugs.python.org
Sun Apr 12 12:40:45 CEST 2009


Naoki INADA <songofacandy at gmail.com> added the comment:

utf-8 is not locale encoding.

>>> f = open('á.txt')

If this line compiled into utf-8 and locale encoding is not utf-8, can't 
open 'á.txt'.

IMHO, in case of Python 2.x, correct approach is fix IOBindings.encoding  
and compile() with pep0263.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1542677>
_______________________________________


More information about the Python-bugs-list mailing list