diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -7708,12 +7708,6 @@ /* All other characters are considered unencodable */ collstart = p; collend = p+1; - while (collend < end) { - if ((0 < *collend && *collend < 256) || - !Py_UNICODE_ISSPACE(*collend) || - Py_UNICODE_TODECIMAL(*collend)) - break; - } /* cache callback name lookup * (if not done yet, i.e. it's the first error) */ if (known_errorHandler==-1) {