summaryrefslogtreecommitdiff
path: root/Modules/_tkinter.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_tkinter.c')
-rw-r--r--Modules/_tkinter.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 8552575f40..c7c1530545 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -3147,9 +3147,7 @@ PyInit__tkinter(void)
it also helps Tcl find its encodings. */
uexe = PyUnicode_FromWideChar(Py_GetProgramName(), -1);
if (uexe) {
- cexe = PyUnicode_AsEncodedString(uexe,
- Py_FileSystemDefaultEncoding,
- NULL);
+ cexe = PyUnicode_EncodeFSDefault(uexe);
if (cexe)
Tcl_FindExecutable(PyBytes_AsString(cexe));
Py_XDECREF(cexe);