[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuplot-info-beta
Subject:    Re: wxWidgets terminal : locale "C" ?
From:       Timothée Lecomte <timothee.lecomte () ens ! fr>
Date:       2005-09-17 17:48:15
Message-ID: 432C56DF.2090602 () ens ! fr
[Download RAW message or body]

Ethan A Merritt wrote:

>The patch changed gnuplot's scanner routine to accept
>commas as part of a number.  That is necessary if the user
>has used "set decimalsign locale", because in this case numbers
>belonging to a gnuplot command line are interpreted according
>to the current LOCALE_NUMERIC.
>
>(...)
>
>Perhaps a better way is to force LC_NUMERIC to C during the
>scanning of a gnuplot input line.  That means all numbers on a
>gnuplot command line must use dot rather than comma as a 
>decimal sign.  Then to fix the original bug report, any code
>that *constructs* a gnuplot command line, must *also* set
>LC_NUMERIC to C while it operates.
>That would include both the built-in functions like zoom and the
>interpretation of key bindings.
>
>Let's have some input from people using a locale with a comma
>for LC_NUMERIC.  Should gnuplot command line syntax be affected
>by LC_NUMERIC, or not?
>
Thanks for your deep investigation !

I finally found that the original bug was *my* problem. In fact, current
cvs is not broken and in particular x11 terminal works properly on my
"french box". It was a problem of my wxwidgets terminal : the wxwidgets
library uses GTK+, which changes the locale itself, so that the default
locale "C" was changed to "fr_FR". I have added setlocale(LC_NUMERIC,
"C"); to my code, where the locale was changed.

I agree that the command line syntax should not be affected by
LC_NUMERIC, and so should always require a dot as a decimal sign.
However, the way numbers are written in the terminal output might be
tweaked with an option.

Greetings,

Timothée Lecomte


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
gnuplot-beta mailing list
gnuplot-beta@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuplot-beta

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic