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 pitrou
Recipients pitrou
Date 2009-06-05.20:17:41
SpamBayes Score 0.03447459
Marked as misclassified No
Message-id <1244233063.22.0.634170589597.issue6213@psf.upfronthosting.co.za>
In-reply-to
Content
The behaviour of several incremental encoders is inconsistent between
2.x and py3k.

In 2.x:
>>> enc = codecs.getincrementalencoder('utf-16')()
>>> enc.getstate()
0
>>> enc.setstate(0)
>>> enc.encode(u'abc')
'\xff\xfea\x00b\x00c\x00'

In py3k:
>>> enc = codecs.getincrementalencoder('utf-16')()
>>> enc.getstate()
2
>>> enc.setstate(0)
>>> enc.encode('abc')
b'a\x00b\x00c\x00'
History
Date User Action Args
2009-06-05 20:17:43pitrousetrecipients: + pitrou
2009-06-05 20:17:43pitrousetmessageid: <1244233063.22.0.634170589597.issue6213@psf.upfronthosting.co.za>
2009-06-05 20:17:41pitroulinkissue6213 messages
2009-06-05 20:17:41pitroucreate