[issue6213] Incremental encoder incompatibility between 2.x and py3k

STINNER Victor report at bugs.python.org
Sat Jul 24 05:41:58 CEST 2010


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Codecs are inconsistents: utf-32 has working getstate() / setstate() methods, whereas utf-8-sig and utf-16 don't (getstate() always return 0, setstate() does nothing).

> Simply moving py3ks getstate/setstate implementation 
> over to 2.x might do the trick.

That's what my patch does :-) It just a copy/paste of Python3 code. It does fix #5006 tests (which are re-enabled by the patch). Using the patch, it's possible to save/restore utf-8-sig and utf-16 codecs state.

----------
keywords: +patch
nosy: +haypo
Added file: http://bugs.python.org/file18170/utf_8_16.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6213>
_______________________________________


More information about the Python-bugs-list mailing list