After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 158387 - incorrect passing of locale settings to the activated application
incorrect passing of locale settings to the activated application
Status: RESOLVED DUPLICATE of bug 164303
Product: bonobo
Classification: Deprecated
Component: libbonobo
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Michael Meeks
bonobo qa
Depends on:
Blocks:
 
 
Reported: 2004-11-15 19:45 UTC by Roman Kagan
Modified: 2005-02-03 09:18 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
fix the way locale settings are passed in bonobo (3.19 KB, patch)
2004-11-15 19:55 UTC, Roman Kagan
none Details | Review

Description Roman Kagan 2004-11-15 19:45: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.
Comment 1 Roman Kagan 2004-11-15 19:55:13 UTC
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.
Comment 2 Mark McLoughlin 2005-02-03 09:18:59 UTC
Sorry this was missed, just fixed in bug #164303

*** This bug has been marked as a duplicate of 164303 ***