Skip to content

Commit

Permalink
respect locale environment except for LC_NUMERIC
Browse files Browse the repository at this point in the history
fixes #1852
  • Loading branch information
5263 committed Jan 24, 2015
1 parent be38772 commit f32caef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 1 addition & 5 deletions src/Main/MainCmd.cpp
Expand Up @@ -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";
Expand Down
6 changes: 2 additions & 4 deletions src/Main/MainGui.cpp
Expand Up @@ -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");
Expand Down

0 comments on commit f32caef

Please sign in to comment.