From 44c36bb1144bc96fa7e840b73903194e1f216548 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 8 Oct 1997 22:49:17 +0000 Subject: [PATCH] Add call to setlocale(LC_ALL, ""). --- Modules/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Modules/main.c b/Modules/main.c index ef18fe64cd5..0b35a9415e8 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -37,6 +37,10 @@ PERFORMANCE OF THIS SOFTWARE. #include #endif +#ifdef HAVE_LOCALE_H +#include +#endif + #ifdef MS_WINDOWS #include #endif @@ -101,6 +105,10 @@ Py_Main(argc, argv) int unbuffered = 0; int stdin_is_interactive = 0; +#ifdef HAVE_SETLOCALE + setlocale(LC_ALL, ""); +#endif + orig_argc = argc; /* For Py_GetArgcArgv() */ orig_argv = argv; @@ -109,7 +117,6 @@ Py_Main(argc, argv) if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0') unbuffered = 1; - Py_UseClassExceptionsFlag = 1; while ((c = getopt(argc, argv, "c:diOSuvX")) != EOF) { if (c == 'c') { /* -c is the last option; following arguments