Issue #10779: PyErr_WarnExplicit() decodes the filename from the filesystem
encoding instead of UTF-8.
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 87755e1..51c39e4 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -783,7 +783,7 @@
 {
     PyObject *res;
     PyObject *message = PyUnicode_FromString(text);
-    PyObject *filename = PyUnicode_FromString(filename_str);
+    PyObject *filename = PyUnicode_DecodeFSDefault(filename_str);
     PyObject *module = NULL;
     int ret = -1;