diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-12-03 11:47:59 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-12-03 11:47:59 (GMT) |
commit | 27b1ca29ccf523e736a47c02f554de5374e241fc (patch) | |
tree | daf9a3fdd3e0fdd67b9b95795fa03f7a6c895398 /Modules/python.c | |
parent | ce31f66a6d23a5df75eb692c2991e7602b2b6571 (diff) | |
download | cpython-27b1ca29ccf523e736a47c02f554de5374e241fc.zip cpython-27b1ca29ccf523e736a47c02f554de5374e241fc.tar.gz cpython-27b1ca29ccf523e736a47c02f554de5374e241fc.tar.bz2 |
Issue #16416: On Mac OS X, operating system data are now always
encoded/decoded to/from UTF-8/surrogateescape, instead of the locale encoding
(which may be ASCII if no locale environment variable is set), to avoid
inconsistencies with os.fsencode() and os.fsdecode() functions which are
already using UTF-8/surrogateescape.
Diffstat (limited to 'Modules/python.c')
-rw-r--r-- | Modules/python.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/Modules/python.c b/Modules/python.c index cf9383f..2be69f1 100644 --- a/Modules/python.c +++ b/Modules/python.c @@ -15,10 +15,6 @@ wmain(int argc, wchar_t **argv) } #else -#ifdef __APPLE__ -extern wchar_t* _Py_DecodeUTF8_surrogateescape(const char *s, Py_ssize_t size); -#endif - int main(int argc, char **argv) { @@ -45,11 +41,7 @@ main(int argc, char **argv) oldloc = strdup(setlocale(LC_ALL, NULL)); setlocale(LC_ALL, ""); for (i = 0; i < argc; i++) { -#ifdef __APPLE__ - argv_copy[i] = _Py_DecodeUTF8_surrogateescape(argv[i], strlen(argv[i])); -#else argv_copy[i] = _Py_char2wchar(argv[i], NULL); -#endif if (!argv_copy[i]) { fprintf(stderr, "Fatal Python error: " "unable to decode the command line argument #%i\n", |