From: Anthony Baxter Date: Thu, 30 Mar 2006 10:53:17 +0000 (+0000) Subject: Fixed bug #1459029 - unicode reprs were double-escaped. X-Git-Tag: v2.5a0~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=262c00a21e4fff85b8d4cad95256684fa219d5e2;p=python Fixed bug #1459029 - unicode reprs were double-escaped. Backed out an old patch from 2000. --- diff --git a/Misc/NEWS b/Misc/NEWS index 6a316ccf7c..e85fef17bf 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -12,6 +12,8 @@ What's New in Python 2.5 alpha 1? Core and builtins ----------------- +- Fixed bug #1459029 - unicode reprs were double-escaped. + - Patch #1396919: The system scope threads are reenabled on FreeBSD 5.4 and later versions. diff --git a/Objects/object.c b/Objects/object.c index 3404c35a32..63fb4fdfef 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -316,7 +316,7 @@ PyObject_Repr(PyObject *v) #ifdef Py_USING_UNICODE if (PyUnicode_Check(res)) { PyObject* str; - str = PyUnicode_AsUnicodeEscapeString(res); + str = PyUnicode_AsEncodedString(res, NULL, NULL); Py_DECREF(res); if (str) res = str;