[issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell
Naoki INADA
report at bugs.python.org
Sun Apr 12 02:54:40 CEST 2009
Naoki INADA <songofacandy at gmail.com> added the comment:
This patch is for iplib/PyShell.py#ModifiedInterpreter.runsource.
if isinstance(source, types.UnicodeType):
import IOBinding
try:
source = source.encode(IOBinding.encoding)
+ source = "# coding: %s\n%s" % (IOBinding.encoding, source)
except UnicodeError:
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1542677>
_______________________________________
More information about the Python-bugs-list
mailing list