diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-14 00:15:01 +0000 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-14 00:15:01 +0000 |
commit | 4edfae1c6830ed80762cb9b5505846ee4eebe6e2 (patch) | |
tree | 18624ae54dd05473679404d0894187f3bf58bd8f | |
parent | 6a1cae023f29cf850a8a3e52697ca5aef8d1c0f2 (diff) | |
download | cpython-4edfae1c6830ed80762cb9b5505846ee4eebe6e2.tar.gz |
Paths and file names from the fs should always be decoded with PyUnicode_DecodeFSDefault and not PyUnicode_FromString
-rw-r--r-- | Python/sysmodule.c | 7 |
1 files changed, 4 insertions, 3 deletions
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", |