Commits

Anonymous committed e9e8098

Fixed bug #1459029 - unicode reprs were double-escaped.
Backed out an old patch from 2000.

  • Participants
  • Parent commits 44e6fc8
  • Branches legacy-trunk

Comments (0)

Files changed (2)

 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.
 

File Objects/object.c

 #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;