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 304517 - glib/libcharset/localcharset.c/_g_locale_charset_raw: handling LANG environment
glib/libcharset/localcharset.c/_g_locale_charset_raw: handling LANG environment
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.6.x
Other All
: Normal minor
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2005-05-17 13:30 UTC by Lőrinczy Zsigmond
Modified: 2011-02-18 16:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Lőrinczy Zsigmond 2005-05-17 13:30:25 UTC
On some platforms (like AIX 5.2) nl_langinfo(CODESET) always returns "ISO8859-1"
without examining environment variables LC_ALL/LC_CTYPE/LANG.
If I #define HAVE_LANGINFO_CODESET to 0, function _g_locale_charset_raw will use
LC_ALL/LC_CTYPE/LANG variables (lines 272-281), but do not strip "charset" part
from the value, like in the case of OS/2 (lines 314-338)
Eg: hu_HU.ISO8859-2 ==> ISO8859-2
Perhaps this part of code could be copied after line 281 to solve this.

Other information:
Comment 1 Matthias Clasen 2005-05-17 13:45:43 UTC
We will need a configure check to test if nl_langinfo actually works to fix this.
Comment 2 Lőrinczy Zsigmond 2005-05-17 13:55:00 UTC
Perhaps the method used by GNU-gettext can be useable:
before ./configure, user can set "am_cv_langinfo_codeset" variable to "no" which
 prevents calling of nl_langinfo(CODESET) in
/gettext-v.v.v/gettext-tools/lib/localcharset.c
Comment 3 Owen Taylor 2005-05-17 18:08:49 UTC
You can almost certainly do the exact same thing for GLib.

(Glib is using the *same* code as gettext.)

But it's not a solution, it's just a hackaround. A solution would
mean that GLib works correctly out of the box without manual 
intervention at the configure step.


Comment 4 Matthias Clasen 2006-12-28 04:41:46 UTC
2006-12-27  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Use AC_CACHE_CHECK for the nl_langinfo
        check.  (#304517, Lőrinczy Zsigmond)