Permalink
Browse files

respect locale environment except for LC_NUMERIC

fixes #1852
  • Loading branch information...
5263 committed Dec 9, 2014
1 parent be38772 commit f32caef40c6eb0a1a634906244f3389c77d2f5ab
Showing with 3 additions and 9 deletions.
  1. +1 −5 src/Main/MainCmd.cpp
  2. +2 −4 src/Main/MainGui.cpp
View
@@ -67,12 +67,8 @@ const char sBanner[] = "(c) Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2
int main( int argc, char ** argv )
{
// Make sure that we use '.' as decimal point
#if defined(FC_OS_LINUX)
putenv("LANG=C");
putenv("LC_ALL=C");
#else
setlocale(LC_ALL, "");
setlocale(LC_NUMERIC, "C");
#endif
// Name and Version of the Application
App::Application::Config()["ExeName"] = "FreeCAD";
View
@@ -191,13 +191,11 @@ int main( int argc, char ** argv )
QFile::setDecodingFunction(myDecoderFunc);
// Make sure that we use '.' as decimal point. See also
// http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559846
putenv("LANG=C");
putenv("LC_ALL=C");
putenv("LC_NUMERIC=C");
putenv("PYTHONPATH=");
#elif defined(FC_OS_MACOSX)
(void)QLocale::system();
putenv("LANG=C");
putenv("LC_ALL=C");
putenv("LC_NUMERIC=C");
putenv("PYTHONPATH=");
#else
setlocale(LC_NUMERIC, "C");

0 comments on commit f32caef

Please sign in to comment.