Index: Python/ast.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/Attic/ast.c,v retrieving revision 1.1.2.56 diff -u -p -r1.1.2.56 ast.c --- Python/ast.c 21 Mar 2005 00:00:54 -0000 1.1.2.56 +++ Python/ast.c 24 Mar 2005 03:54:50 -0000 @@ -2387,6 +2724,7 @@ decode_utf8(const char **sPtr, const cha #else PyObject *u, *v; char *s, *t; + t = s = *sPtr; /* while (s < end && *s != '\\') s++; */ /* inefficient for u".." */ while (s < end && (*s & 0x80)) s++; *sPtr = s; @@ -2407,8 +2745,10 @@ decode_unicode(const char *s, size_t len char *p; const char *end; if (encoding == NULL) { + buf = s; u = NULL; } else if (strcmp(encoding, "iso-8859-1") == 0) { + buf = s; u = NULL; } else { /* "\XX" may become "\u005c\uHHLL" (12 bytes) */ @@ -2508,15 +2848,7 @@ parsestr(const char *s, const char *enco } #ifdef Py_USING_UNICODE if (unicode || Py_UnicodeFlag) { -#if 0 - /* XXX currently broken */ return decode_unicode(s, len, rawmode, encoding); -#else - if (rawmode) - return PyUnicode_DecodeRawUnicodeEscape(s, len, NULL); - else - return PyUnicode_DecodeUnicodeEscape(s, len, NULL); -#endif } #endif need_encoding = (encoding != NULL &&