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 ocean-city
Recipients cpalmer, ocean-city, pitrou
Date 2008-07-25.11:10:19
SpamBayes Score 2.82331e-06
Marked as misclassified No
Message-id <>
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;
-        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\", line 12, in decode
    return codecs.utf_7_decode(input, errors, True)
UnicodeDecodeError: 'utf7' codec can't decode bytes in position 0-1:

# But I don't know whether this behavior is right or not....

I confirmed test_unicode, test_codecs, test_codeccallbacks passed.
Date User Action Args
2008-07-25 11:10:21ocean-citysetspambayes_score: 2.82331e-06 -> 2.82331e-06
recipients: + ocean-city, pitrou, cpalmer
2008-07-25 11:10:21ocean-citysetspambayes_score: 2.82331e-06 -> 2.82331e-06
messageid: <>
2008-07-25 11:10:20ocean-citylinkissue2242 messages
2008-07-25 11:10:19ocean-citycreate