|
From: Ethan A M. <merritt@u.washington.edu> - 2007-11-24 03:56:07
|
On Friday 23 November 2007 18:21, Allin Cottrell wrote: > > > setlocale (LC_ALL, ""); > > > > Isn't there one already? > > Or at any rate a call to setlocale(LC_CTYPE, "")? > > When I enter gnuplot it correctly knows about the locale: > > > > lascaux [1235] ./gnuplot... > > > gnuplot> show locale > > > > LC_CTYPE is en_US.UTF-8 > > LC_TIME is C > > That's what I see here too, but g_get_charset(), called in > gp_cairo.c, is getting ANSI_X3.4-1968 (ascii). Something is broken, it seems. But I really don't know what. > The GLib reference says, > "A number of interfaces in GLib depend on the current locale in > which an application is running. Therefore, most GLib-using > applications should call setlocale (LC_ALL, "") We most definitely do not want LC_ALL, as that will mess with the time/date and numerical formats also. We have separate commands to load LC_TIME and LC_NUMERIC. > I tried sticking that exact invocation into gp_cairo.c, prior to > the call to g_get_charset, and the latter then found UTF-8 OK. Possibly that pins down the brokeness. Setting LC_CTYPE should do exactly what we want - set the character encoding. But LC_ALL may be [incorrectly] required by some library instead of the more specific LC_CTYPE? -- Ethan A Merritt |