Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment:
With this patch? Yes, it fixed crash.
Index: Objects/unicodeobject.c
===================================================================
--- Objects/unicodeobject.c (revision 65223)
+++ Objects/unicodeobject.c (working copy)
@@ -1523,7 +1523,7 @@
while (s < e) {
Py_UNICODE ch;
restart:
- ch = *s;
+ ch = (unsigned char)*s;
if (inShift) {
if ((ch == '-') || !B64CHAR(ch)) {
>>> '+\xc1'.decode("utf7")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "e:\python-dev\trunk\lib\encodings\utf_7.py", line 12, in decode
return codecs.utf_7_decode(input, errors, True)
UnicodeDecodeError: 'utf7' codec can't decode bytes in position 0-1:
unexpected
# But I don't know whether this behavior is right or not....
I confirmed test_unicode, test_codecs, test_codeccallbacks passed.
_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2242>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com