Index: Python/pythonrun.c =================================================================== --- Python/pythonrun.c (révision 78770) +++ Python/pythonrun.c (copie de travail) @@ -1546,6 +1546,8 @@ char *msg = NULL; errtype = PyExc_SyntaxError; switch (err->error) { + case E_ERROR: + return; case E_SYNTAX: errtype = PyExc_IndentationError; if (err->expected == INDENT) Index: Parser/tokenizer.c =================================================================== --- Parser/tokenizer.c (révision 78770) +++ Parser/tokenizer.c (copie de travail) @@ -817,8 +817,12 @@ return -1; error_clear: + Py_DECREF(enc); + if (!PyErr_ExceptionMatches(PyExc_UnicodeDecodeError)) { + tok->done = E_ERROR; + return -1; + } /* Fallback to iso-8859-1: for backward compatibility */ - Py_DECREF(enc); PyErr_Clear(); return 0; }