|
From: Ethan M. <merritt@u.washington.edu> - 2005-05-24 15:28:53
|
On Tuesday 24 May 2005 07:04 am, Petr Mikulik wrote:
> > > Cannot be .Xdefaults parsing locale-independent?
>
> No, it is in gnuplot -- gplt_x11.c:
>
> if (sscanf(v, "%30[^,],%lf", color, &intensity) == 2) {
Locale handling is done in sscanf (glibc).
> It is the above sscanf() which returns different values according to locale.
Exactly.
> It seems that this in gplt_x11.c
> setlocale(LC_ALL, "")==NULL
> is responsible for the problems.
setlocale( ,"") tells libc to use the locale which the user has
requested for this process. That is the correct thing to do.
> Could locales be ignored when reading .Xdefaults?
Why? It's the user's .Xdefaults file. He should construct
it to be consistent with his chosen locale.
But if you want gnuplot_x11 always to run in a specific locale,
you can make a wrapper script:
gnuplot_x11:
#!/bin/csh
setenv LC_TYPE C
real_gnuplot_x11 $@
--
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|