STINNER Victor added the comment:

I pushed utf8.patch by mistake :-/ The advantage is that buildbots found bugs. 
Attached utf8-2.patch fixed bugs.

The bug was how the "s" variable was set in the error handler. It's now set 
with:

   s = starts + endinpos;

Bugs found by the buildbots:

======================================================================
FAIL: test_invalid_cb_for_3bytes_seq (test.test_unicode.UnicodeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_unicode.py", line 
1897, in test_invalid_cb_for_3bytes_seq
    'invalid continuation byte')
  File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_unicode.py", line 
1772, in assertCorrectUTF8Decoding
    self.assertEqual(seq.decode('utf-8', 'replace'), res)
AssertionError: '��\x00' != '�\x00'
- ��
? -
+ �

======================================================================
FAIL: test_unquote_with_unicode (test.test_urllib.UnquotingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_urllib.py", line 1016, 
in test_unquote_with_unicode
    "using unquote(): %r != %r" % (expect, result))
AssertionError: '�' != '��'
- �
+ ��
? +
 : using unquote(): '�' != '��'

----------
Added file: http://bugs.python.org/file40544/utf8-2.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24870>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to