Commit 44c36bb1 authored by Guido van Rossum's avatar Guido van Rossum

Add call to setlocale(LC_ALL, "").

parent 96013151
...@@ -37,6 +37,10 @@ PERFORMANCE OF THIS SOFTWARE. ...@@ -37,6 +37,10 @@ PERFORMANCE OF THIS SOFTWARE.
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef HAVE_LOCALE_H
#include <locale.h>
#endif
#ifdef MS_WINDOWS #ifdef MS_WINDOWS
#include <fcntl.h> #include <fcntl.h>
#endif #endif
...@@ -101,6 +105,10 @@ Py_Main(argc, argv) ...@@ -101,6 +105,10 @@ Py_Main(argc, argv)
int unbuffered = 0; int unbuffered = 0;
int stdin_is_interactive = 0; int stdin_is_interactive = 0;
#ifdef HAVE_SETLOCALE
setlocale(LC_ALL, "");
#endif
orig_argc = argc; /* For Py_GetArgcArgv() */ orig_argc = argc; /* For Py_GetArgcArgv() */
orig_argv = argv; orig_argv = argv;
...@@ -109,7 +117,6 @@ Py_Main(argc, argv) ...@@ -109,7 +117,6 @@ Py_Main(argc, argv)
if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0') if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0')
unbuffered = 1; unbuffered = 1;
Py_UseClassExceptionsFlag = 1;
while ((c = getopt(argc, argv, "c:diOSuvX")) != EOF) { while ((c = getopt(argc, argv, "c:diOSuvX")) != EOF) {
if (c == 'c') { if (c == 'c') {
/* -c is the last option; following arguments /* -c is the last option; following arguments
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment