[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2012-01-31 Thread Kang-Hao (Kenny) Lu
Changes by Kang-Hao (Kenny) Lu kennyl...@csail.mit.edu: -- nosy: +kennyluck ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12100 ___ ___

[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-25 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The initial problem (reset() at each call to .encode()) is fixed in Python 2.7, 3.1, 3.2 and 3.3. I opened a new issue, #12171, for the second problem noticed by Armin (decreset vs encreset). -- resolution: - fixed

[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I think it's better to use a StringIO instance for the tests. For which test excatly? An encoder produces bytes, I don't the relation with StringIO. -- ___ Python tracker

[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@haypocalc.com added the comment: I think it's better to use a StringIO instance for the tests. For which test excatly? An encoder produces bytes, I don't the relation with

[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-24 Thread Martin
Martin gzl...@googlemail.com added the comment: Does Victor Stinner have a psychic link with Armin Rigo? :) https://bitbucket.org/pypy/pypy/src/7f593e7877d4/pypy/module/_multibytecodec/app_multibytecodec.py # My theory is that they are not widely used on CPython either, because # I found two

[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le mardi 24 mai 2011 à 18:13 +, Martin a écrit : Martin gzl...@googlemail.com added the comment: Does Victor Stinner have a psychic link with Armin Rigo? :)

[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-24 Thread Armin Rigo
Armin Rigo ar...@users.sourceforge.net added the comment: Hi :-) I did not report the two issues I found so far because I didn't finish the PyPy implementation of CJK yet, and I'm very new to anything related to codecs; additionally I didn't check Python 3.x, as I was just following the 2.7

[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-24 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset bd17396895fb by Victor Stinner in branch '3.1': Issue #12100: Don't reset incremental encoders of CJK codecs at each call to http://hg.python.org/cpython/rev/bd17396895fb New changeset 7f2ab2f95a04 by Victor Stinner in branch '3.2':

[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-24 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset e789b4cda872 by Victor Stinner in branch '2.7': Issue #12100: Don't reset incremental encoders of CJK codecs at each call to http://hg.python.org/cpython/rev/e789b4cda872 -- ___ Python

[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-22 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12100 ___ ___

[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: I think it's better to use a StringIO instance for the tests. Regarding resetting the incremental codec every time .encode() is called: Hye-Shik will have to comment. Perhaps there's an internal reason why they do this. --

[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-17 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: Stateful CJK codecs reset the codec at each call to encode() producing a valid but overlong output: import codecs encoder = codecs.getincrementalencoder('hz')() encoder.encode('\u804a') + encoder.encode('\u804a')