[issue1602] windows console doesn't print or input Unicode
STINNER Victor
report at bugs.python.org
Thu Apr 5 13:47:08 CEST 2012
STINNER Victor <victor.stinner at gmail.com> added the comment:
The issue #14227 has been marked as a duplicate of this issue. Copy of msg155149:
This is on Windows 7 SP1. Run 'chcp 65001' then Python from a console. Note the extra characters when non-ASCII characters are in the string. At a guess it appears to be using the UTF-8 byte length of the internal representation instead of the character count.
Python 3.3.0a1 (default, Mar 4 2012, 17:27:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print('hello')
hello
>>> print('p\u012bny\u012bn')
pīnyīn
n
>>> print('\u012b'*10)
īīīīīīīīīī
�īīīī
�ī
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1602>
_______________________________________
More information about the Python-bugs-list
mailing list