[XForms] dot vs. comma (0.88 vs. 1.0.x)

Jens Thoms Toerring Jens.Toerring at physik.fu-berlin.de
Fri May 28 11:41:11 EDT 2004


On Fri, May 28, 2004 at 04:55:50PM +0200, Jean-Marc Lasgouttes wrote:
> >>>>> "Jens" == Jens Thoms Toerring <Jens.Toerring at physik.fu-berlin.de> writes:
> Jens> To subscribers of the xforms list
> Jens> On Fri, May 28, 2004 at 04:13:16PM +0200, Bernd Hahnebach wrote:
> >> 2. It's again about XStab. As I said the software compiles using
> >> xforms 0.88 as well as using xforms 1.0.x There is only one
> >> differences which is quit important. The decimal separator in the
> >> whole software is a dot using 0.88 and a comma using 1.0.x. The
> >> comma causes big problems. I would like to use xforms 1.0.x and the
> >> dot as decimal separator.
> 
> Jens> Newer versions of xforms seem to set the locale to the one set
> Jens> in the environment variables (caught me also unaware when that
> Jens> happened, suddenly lots of things stopped working...). You may
> Jens> have to tell it which one to use instead after the
> Jens> fl_initialize() call. I usually set it with
> 
> Jens> setlocale( LC_NUMERIC, "C" );
> 
> Jens> directly after the flinitialize() call.
> 
> Yes, this began after xforms 0.89.5 and I do not really like it :(
> However, I am not sure that we should remove that now...

I think it's a misfeature - if someone wants to set a locale (s)he
knows where to find it, and changing it behinds ones back isn't
the right thing IMHO. Especially since there's nothing that would
force you to call fl_initialize() at the first thing in your program.
So a different locale may have already been set, which then suddenly
gets overwritten. And it's also rather astonishing when out of the
blue e.g. scanf() looks for a comma as the decimal separator and you
have never seen something like this before. Took me quite some time
to figure out what was happening back then (I hadn't taken a closer
look at locales before) and xforms was more or less the last
suspect, I thought I had screwed up somewhere;-)

                                 Regards, Jens
-- 
  \   Jens Thoms Toerring  ___  Jens.Toerring at physik.fu-berlin.de
   \__________________________  http://www.toerring.de



More information about the Xforms mailing list