GNOME Bugzilla – Bug 158387
incorrect passing of locale settings to the activated application
Last modified: 2005-02-03 09:18:59 UTC
Run an application using bonobo-activation (e.g. gnome-panel) with one of the locale categories different from the others, e.g. LANG=ru_RU.UTF-8 LC_MESSAGES=C. Result: the activated application (e.g. applet) is run with LC_ALL environment variable set to an illegal value The reason is that the locale setting in the activating application is queried by setlocale(LC_ALL, NULL) call, which in case when the locales in various categories differ, returns a string which, being a valid input for a further setlocale call, is not a simple locale and thus is not a valid LC_ALL environment variable value.
Created attachment 33817 [details] [review] fix the way locale settings are passed in bonobo This patch queries all the available locale categories via setlocale calls in the activating application, and passess them to the activated ones as the corresponding environment variables. Also, in case the b-a-s has been called with LC_ALL set, unset it for the activated applications so that it doesn't take over the locale settings coming from the activating application. One minor problem here is that there seems to be no interface to determine at runtime which locale settings are available, so I try to do it at compile time. This means that if the compiled libbonobo is used on a system with a newer libc supporiting more locale categories, they won't be inherited in the activated app.
Sorry this was missed, just fixed in bug #164303 *** This bug has been marked as a duplicate of 164303 ***