Issue #8438: Remove reference to the missing "surrogateescape" encoding
error handler from the new IO library.
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
index ec320f7..af98fd0 100644
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -248,7 +248,7 @@
 				return -1;
 
 			stringobj = PyUnicode_AsEncodedString(
-				u, Py_FileSystemDefaultEncoding, "surrogateescape");
+				u, Py_FileSystemDefaultEncoding, NULL);
 			Py_DECREF(u);
 			if (stringobj == NULL)
 				return -1;