From: Christian Heimes <christian@cheimes.de>
Date: Wed, 14 Nov 2007 00:15:01 +0000 (+0000)
Subject: Paths and file names from the fs should always be decoded with PyUnicode_DecodeFSDefa... 
X-Git-Tag: v3.0a2~191
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb9b39bd579b6365481542a82f2f481352f008db;p=python

Paths and file names from the fs should always be decoded with PyUnicode_DecodeFSDefault and not PyUnicode_FromString
---

diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 6fcbe75eef..b77d18417a 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1072,11 +1072,12 @@ _PySys_Init(void)
 	SET_SYS_FROM_STRING("platform",
 			    PyUnicode_FromString(Py_GetPlatform()));
 	SET_SYS_FROM_STRING("executable",
-			    PyUnicode_FromString(Py_GetProgramFullPath()));
+			    PyUnicode_DecodeFSDefault(
+				Py_GetProgramFullPath()));
 	SET_SYS_FROM_STRING("prefix",
-			    PyUnicode_FromString(Py_GetPrefix()));
+			    PyUnicode_DecodeFSDefault(Py_GetPrefix()));
 	SET_SYS_FROM_STRING("exec_prefix",
-		   	    PyUnicode_FromString(Py_GetExecPrefix()));
+		   	    PyUnicode_DecodeFSDefault(Py_GetExecPrefix()));
 	SET_SYS_FROM_STRING("maxint",
 			    PyInt_FromLong(PyInt_GetMax()));
 	SET_SYS_FROM_STRING("maxsize",