[New-bugs-announce] [issue6345] extra characters displayed when writing to sys.stdout.buffer
Mark Tolonen
report at bugs.python.org
Fri Jun 26 04:20:30 CEST 2009
New submission from Mark Tolonen <metolone at hotmail.com>:
According to Issue xxxx, sys.stdout.buffer is the binary stream
underlying stdout. I see the following behavior on 3.0.1 and 3.1rc2
when writing to a console window:
Python 3.1rc2 (r31rc2:73414, Jun 13 2009, 16:43:15) [MSC v.1500 32 bit
(Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>>
sys.stdout.buffer.write('hello\u200bworld'.encode('cp437','replace'))
hello?world11
Notice the extra '11' at the end of the string.
----------
components: IO
messages: 89719
nosy: metolone
severity: normal
status: open
title: extra characters displayed when writing to sys.stdout.buffer
type: behavior
versions: Python 3.1
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6345>
_______________________________________
More information about the New-bugs-announce
mailing list