New submission from Maries Ionel Cristian:
cp65001 is purported to be an alias for utf8.
I get these results:
C:\Python27chcp 65001
Active code page: 65001
C:\Python27python
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on
win32
Type help, copyright, credits or
eryksun added the comment:
cp65001 was added in Python 3.3, for what it's worth. For me codepage 65001
(CP_UTF8) is broken for most console programs.
Windows API WriteFile gets routed to WriteConsoleA for a console buffer handle,
but WriteConsoleA has a different spec. It returns the number
STINNER Victor added the comment:
The support of the code page 65001 (CP_UTF8, cp65001) was added in Python
3.3. It is usually used for the OEM code page. The chcp command changes the
Windows console encoding which is used by sys.{stdin,stdout,stderr).encoding.
locale.getpreferredencoding()
Mark Lawrence added the comment:
See also Issue20574.
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21808
___
___
R. David Murray added the comment:
I agree with Haypo, because if he isn't interested in doing it, it is unlikely
anyone else will find the problem tractable :) Certainly not anyone else on
the core team. But, the danger of breaking things in 2.7 is the clincher.
--
nosy:
eryksun added the comment:
Setting the Windows console encoding to cp65001 using the chcp
command doesn't make the Windows console fully Unicode compliant.
It is a little bit better using TTF fonts, but it's not enough.
See the old issue #1602 opened 7 years ago and not fixed yet.
It's
STINNER Victor added the comment:
It's annoyingly broken for me due to the problems with WriteFile and ReadFile.
sys.stdout.write() doen't use WriteFile. Again, see the issue #1602 if you are
interested to improve the Unicode support of the Windows console.
A workaround is for example to
eryksun added the comment:
sys.stdout.write() doen't use WriteFile. Again, see the
issue #1602 if you are interested to improve the Unicode
support of the Windows console.
_write calls WriteFile because Python 3 sets standard I/O to binary mode. The
source is distributed with Visual
STINNER Victor added the comment:
@eryksun: I agree that using the Python interactive interpreter in the Windows
console has many important issues when using non-ASCII characters. But the
title of this issue and the initial message is about the code page 65001. The
*code page* is supported in