Skip to content

Instantly share code, notes, and snippets.

@kahrl

kahrl/gist:7619600

Created Nov 23, 2013
Embed
What would you like to do?
diff --git a/src/gettext.cpp b/src/gettext.cpp
index d4dc719..4c52832 100644
--- a/src/gettext.cpp
+++ b/src/gettext.cpp
@@ -120,6 +120,14 @@ void init_gettext(const char *path,std::string configured_language,int argc, cha
#else
void init_gettext(const char *path,std::string configured_language) {
#endif
+#ifndef _WIN32
+ setenv("LC_NUMERIC", "C", 1);
+#elif defined(_MSC_VER)
+ putenv("LC_NUMERIC=C");
+ SetEnvironmentVariableA("LC_NUMERIC","C");
+#else // Mingw
+ putenv("LC_NUMERIC=C");
+#endif
#if USE_GETTEXT
/** first try to set user override environment **/
if (configured_language.length() != 0) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment