This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients ezio.melotti, martin.panter, vstinner
Date 2015-12-15.02:37:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450147044.33.0.0242462239972.issue25863@psf.upfronthosting.co.za>
In-reply-to
Content
>>> from io import *
>>> text = TextIOWrapper(BytesIO(), "iso-2022-jp")
>>> text.write(u"P")
1
>>> text.tell()
1
>>> text.write(u"anter 正")
7
>>> text.tell()
12
>>> text.write(u"孝")
1
>>> text.seek(12)
12
>>> text.read()  # Should return 孝, not ASCII
"9'"
>>> text.buffer.getvalue()
b"Panter \x1b$B@59'"
>>> text.seek(1)
1
>>> text.read(7)
'anter 正'
>>> text.tell()  # Another bug?
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'iso2022_jp' codec can't decode bytes in position 2-3: illegal multibyte sequence
History
Date User Action Args
2015-12-15 02:37:24martin.pantersetrecipients: + martin.panter, vstinner, ezio.melotti
2015-12-15 02:37:24martin.pantersetmessageid: <1450147044.33.0.0242462239972.issue25863@psf.upfronthosting.co.za>
2015-12-15 02:37:24martin.panterlinkissue25863 messages
2015-12-15 02:37:23martin.pantercreate