PyFile_FromFd() uses PyUnicode_DecodeFSDefault() instead of
PyUnicode_FromString() to support surrogates in the filename and use the right
encoding
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 85e87d7..bbed57b 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -41,7 +41,7 @@
 	if (stream == NULL)
 		return NULL;
 	if (name != NULL) {
-		nameobj = PyUnicode_FromString(name);
+		nameobj = PyUnicode_DecodeFSDefault(name);
 		if (nameobj == NULL)
 			PyErr_Clear();
 		else {