summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 2348b94d..9c6b3cf7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2,6 +2,9 @@
#include <ctype.h>
#include <errno.h>
#include <libgen.h>
+#ifdef HAVE_SETLOCALE
+#include <locale.h>
+#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -319,6 +322,10 @@ int main(int argc, char* argv[]) {
jv ARGS = jv_array(); /* positional arguments */
jv program_arguments = jv_object(); /* named arguments */
+#ifdef HAVE_SETLOCALE
+ (void) setlocale(LC_ALL, "");
+#endif
+
#ifdef WIN32
jv_tsd_dtoa_ctx_init();
fflush(stdout);