Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9601315 commit 44c36bbCopy full SHA for 44c36bb
1 file changed
Modules/main.c
@@ -37,6 +37,10 @@ PERFORMANCE OF THIS SOFTWARE.
37
#include <unistd.h>
38
#endif
39
40
+#ifdef HAVE_LOCALE_H
41
+#include <locale.h>
42
+#endif
43
+
44
#ifdef MS_WINDOWS
45
#include <fcntl.h>
46
@@ -101,6 +105,10 @@ Py_Main(argc, argv)
101
105
int unbuffered = 0;
102
106
int stdin_is_interactive = 0;
103
107
108
+#ifdef HAVE_SETLOCALE
109
+ setlocale(LC_ALL, "");
110
111
104
112
orig_argc = argc; /* For Py_GetArgcArgv() */
113
orig_argv = argv;
114
@@ -109,7 +117,6 @@ Py_Main(argc, argv)
117
if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0')
118
unbuffered = 1;
119
- Py_UseClassExceptionsFlag = 1;
120
while ((c = getopt(argc, argv, "c:diOSuvX")) != EOF) {
121
if (c == 'c') {
115
122
/* -c is the last option; following arguments
0 commit comments