New submission from Antoine Pitrou <pit...@free.fr>: 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' ---------- messages: 88972 nosy: pitrou priority: normal severity: normal status: open title: Incremental encoder incompatibility between 2.x and py3k type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6213> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com