Fix escaping of non-ASCII characters.
diff --git a/Lib/test/test_pep263.py b/Lib/test/test_pep263.py
index b1ffc03..7cc5526 100644
--- a/Lib/test/test_pep263.py
+++ b/Lib/test/test_pep263.py
@@ -1,2 +1,3 @@
 #! -*- coding: koi8-r -*-
 assert u"ðÉÔÏÎ".encode("utf-8") == '\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd'
+assert u"\ð".encode("utf-8") == '\\\xd0\x9f'
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index dd38ee3..c090e9b 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -541,6 +541,7 @@
 	end = s + len;
 	while (s < end) {
 		if (*s != '\\') {
+		  non_esc:
 #ifdef Py_USING_UNICODE
 			if (recode_encoding && (*s & 0x80)) {
 				PyObject *u, *w;
@@ -656,8 +657,9 @@
 #endif
 		default:
 			*p++ = '\\';
-			*p++ = s[-1];
-			break;
+			s--;
+			goto non_esc; /* an arbitry number of unescaped
+					 UTF-8 bytes may follow. */
 		}
 	}
 	if (p-buf < newlen)