From 262c00a21e4fff85b8d4cad95256684fa219d5e2 Mon Sep 17 00:00:00 2001 From: Anthony Baxter Date: Thu, 30 Mar 2006 10:53:17 +0000 Subject: [PATCH] Fixed bug #1459029 - unicode reprs were double-escaped. Backed out an old patch from 2000. --- Misc/NEWS | 2 ++ Objects/object.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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; -- 2.40.0