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 doerwalter
Recipients
Date 2002-07-26.15:41:07
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=89016

The attached new version of the test script add test for wrong
parameter passed to the callbacks or wrong results returned
from the callback. It also add tests to the long string
tests for copies of the builtin error handlers, so the codec
does not recognize the name and goes through the general
callback machinery.

UTF-7 decoding still has a flaw inherited from the current
implementation:

>>> "+xxx".decode("utf-7")                    
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
UnicodeDecodeError: 'utf7' codec can't decode bytes in
position 0-3: unterminated shift sequence
*>>> "+xxx".decode("utf-7", "ignore")
u'\uc71c'

The decoder should consider the whole sequence "+xxx" as
undecodable, so "Ignore" should return an empty string.
Currently the correct sequence will be passed to the
callback, but the faulty sequence has already been emitted
to the result string.
History
Date User Action Args
2007-08-23 15:06:08adminlinkissue432401 messages
2007-08-23 15:06:08admincreate