|
From: Allin C. <cot...@wf...> - 2007-11-24 19:38:56
|
On Sat, 24 Nov 2007, Ethan A Merritt wrote: > > 2) How did LC_CTYPE _get_ to be equal to en_US.UTF-8 at this point > > in execution, when the only command that has been issued is "show > > locale"? > > Puzzling indeed. With the help of many trace statements, I find that > the locale is loaded during the first call to readline_ipc() in rlgets(), > which is itself called from gp_get_string()... Nice detective work! > > 3) Anyway, by the time you plot a graph using cairo the LC_CTYPE > > setting has reverted to "C". I've verified that by sticking a > > print before the g_get_charset() invocation: > > I can't reproduce that. Once the locale gets set, it sticks. > As you would expect. Yup, I was wrong. The active factor was interactive vs non-interactive, not anything that happened in between "show locale" and gp_cairo calling g_get_charset. > I am thinking that regardless of any possible bugs in the cairo > processing, we should be consistent and always call > setlocale(LC_CTYPE,""). That makes sense to me: maybe in init_locale? Allin Cottrell |