aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2012-04-30 09:00:32 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2012-04-30 09:00:32 -0400
commitbb62287aaf3989d0f63ea21cd18a3f21ece33b7f (patch)
tree54576d26948bb65c36c82234c12e8377c5ab929e
parent23bb21c7cf29d55f2b9c75e3eb8f0811113bb509 (diff)
downloadtextadept-bb62287aaf3989d0f63ea21cd18a3f21ece33b7f.tar.gz
textadept-bb62287aaf3989d0f63ea21cd18a3f21ece33b7f.zip
Use "C" locale for numbers to prevent formatting errors for French, German, etc.
-rw-r--r--src/textadept.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/textadept.c b/src/textadept.c
index b5c477b9..b59f169e 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -1,5 +1,6 @@
// Copyright 2007-2012 Mitchell mitchell.att.foicica.com. See LICENSE.
+#include <locale.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
@@ -176,6 +177,7 @@ int main(int argc, char **argv) {
if (!registered || !g_application_get_is_remote(app) || force) {
#endif
+ setlocale(LC_NUMERIC, "C");
if (lua = luaL_newstate(), !lL_init(lua, argc, argv, FALSE)) return 1;
new_window();
lL_dofile(lua, "init.lua");