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.823311e-06
Marked as misclassified No
Message-id <1216984221.46.0.54900259188.issue2242@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-07-25 11:10:21ocean-citysetspambayes_score: 2.82331e-06 -> 2.823311e-06
recipients: + ocean-city, pitrou, cpalmer
2008-07-25 11:10:21ocean-citysetspambayes_score: 2.82331e-06 -> 2.82331e-06
messageid: <1216984221.46.0.54900259188.issue2242@psf.upfronthosting.co.za>
2008-07-25 11:10:20ocean-citylinkissue2242 messages
2008-07-25 11:10:19ocean-citycreate