|
From: <tim...@en...> - 2005-09-17 17:47:45
|
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=20 >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=C3=A9e Lecomte |