From 68b05f12041d2b5733b12051dfffe12bb587bd87 Mon Sep 17 00:00:00 2001 From: sireus Date: Sun, 8 May 2011 17:12:29 +0000 Subject: [PATCH] make sure things like atof work consistently (regardless of the locale) git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6412 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/i18n.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/src/i18n.cpp b/source/src/i18n.cpp index 1f9ed8e7..16324c30 100644 --- a/source/src/i18n.cpp +++ b/source/src/i18n.cpp @@ -6,6 +6,7 @@ i18nmanager::i18nmanager(const char *domain, const char *basepath) : domain(domain), basepath(basepath) { locale = setlocale(LC_ALL, ""); // use current default locale + setlocale(LC_NUMERIC, "C"); // make sure numeric is consistent (very important for float usage in scripts) bindtextdomain(domain, basepath); // set base path textdomain(domain); bind_textdomain_codeset(domain, "UTF-8"); // we use the utf-8 charset only