diff Python/pythonrun.c @ 47611:da47e7e135ae

#2630: Implement PEP 3138. The repr() of a string now contains printable Unicode characters unescaped. The new ascii() builtin can be used to get a repr() with only ASCII characters in it. PEP and patch were written by Atsuo Ishimoto.
author Georg Brandl <georg@python.org>
date Wed, 11 Jun 2008 18:37:52 +0000
parents e2eb70235392
children 2ee09afee126
line wrap: on
line diff
--- a/Python/pythonrun.c	Wed Jun 11 18:35:23 2008 +0000
+++ b/Python/pythonrun.c	Wed Jun 11 18:37:52 2008 +0000
@@ -793,7 +793,7 @@
 	}
 	else {
 		if (!(std = PyFile_FromFd(fd, "<stderr>", "w", -1, encoding,
-					  errors, "\n", 0))) {
+					  "backslashreplace", "\n", 0))) {
 			goto error;
 		}
 	} /* if (fd < 0) */