From 98fac9d2a7615d9555581fcab4ffa1d6fdd0e5b3 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 24 Jan 2001 11:08:32 +0000 Subject: [PATCH] Fix the floats-dont-like-locales problem git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1377 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 6 ++++++ src/lyx_gui.C | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3060d10116..090c8d5919 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2001-01-24 Jean-Marc Lasgouttes + + * lyx_gui.C (LyXGUI): force the LC_NUMERIC locale to "C" after + calling fl_initialize(). This fixes the problem with ',' as + decimal separator in text files. + 2001-01-24 Dekel Tsur * trans.C (process): Fix the keymap bug. diff --git a/src/lyx_gui.C b/src/lyx_gui.C index ddff923cc3..b014e3faa5 100644 --- a/src/lyx_gui.C +++ b/src/lyx_gui.C @@ -10,6 +10,7 @@ #include #include +#include #ifdef __GNUG__ #pragma implementation @@ -108,7 +109,10 @@ LyXGUI::LyXGUI(LyX * owner, int * argc, char * argv[], bool GUI) static const int num_res = sizeof(res)/sizeof(FL_resource); fl_initialize(argc, argv, "LyX", cmdopt, num_res); - fl_get_app_resources(res, num_res); + // It appears that, in xforms >=0.89.5, fl_initialize() + // calls setlocale() and ruins our LC_NUMERIC setting. + setlocale(LC_NUMERIC, "C"); + fl_get_app_resources(res, num_res); static const int geometryBitmask = XParseGeometry( geometry, -- 2.39.2