Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some point.
authorMatthias Clasen <mclasen@redhat.com>
Fri, 23 Apr 2004 14:47:44 +0000 (14:47 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 23 Apr 2004 14:47:44 +0000 (14:47 +0000)
2004-04-23  Matthias Clasen  <mclasen@redhat.com>

* glib/libcharset/localcharset.c (_g_locale_get_charset_aliases):
Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some
point.  (#139134, Piotr Klaban)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
docs/reference/ChangeLog
docs/reference/glib/running.sgml
glib/libcharset/localcharset.c

index 9d2281e619b37b9a2ca6666da1ab3f12476544bc..a3e70a305ec8cc09bedb9d013d4c3f064c934a60 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2004-04-23  Matthias Clasen  <mclasen@redhat.com>
 
+       * glib/libcharset/localcharset.c (_g_locale_get_charset_aliases): 
+       Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some
+       point.  (#139134, Piotr Klaban)
+
        * glib/gconvert.c (open_converter): Don't call g_strerror() here, 
        since it can lead to infinite recursion.  (#139133, Piotr Klaban)
 
index 9d2281e619b37b9a2ca6666da1ab3f12476544bc..a3e70a305ec8cc09bedb9d013d4c3f064c934a60 100644 (file)
@@ -1,5 +1,9 @@
 2004-04-23  Matthias Clasen  <mclasen@redhat.com>
 
+       * glib/libcharset/localcharset.c (_g_locale_get_charset_aliases): 
+       Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some
+       point.  (#139134, Piotr Klaban)
+
        * glib/gconvert.c (open_converter): Don't call g_strerror() here, 
        since it can lead to infinite recursion.  (#139133, Piotr Klaban)
 
index 9d2281e619b37b9a2ca6666da1ab3f12476544bc..a3e70a305ec8cc09bedb9d013d4c3f064c934a60 100644 (file)
@@ -1,5 +1,9 @@
 2004-04-23  Matthias Clasen  <mclasen@redhat.com>
 
+       * glib/libcharset/localcharset.c (_g_locale_get_charset_aliases): 
+       Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some
+       point.  (#139134, Piotr Klaban)
+
        * glib/gconvert.c (open_converter): Don't call g_strerror() here, 
        since it can lead to infinite recursion.  (#139133, Piotr Klaban)
 
index 9d2281e619b37b9a2ca6666da1ab3f12476544bc..a3e70a305ec8cc09bedb9d013d4c3f064c934a60 100644 (file)
@@ -1,5 +1,9 @@
 2004-04-23  Matthias Clasen  <mclasen@redhat.com>
 
+       * glib/libcharset/localcharset.c (_g_locale_get_charset_aliases): 
+       Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some
+       point.  (#139134, Piotr Klaban)
+
        * glib/gconvert.c (open_converter): Don't call g_strerror() here, 
        since it can lead to infinite recursion.  (#139133, Piotr Klaban)
 
index 9d2281e619b37b9a2ca6666da1ab3f12476544bc..a3e70a305ec8cc09bedb9d013d4c3f064c934a60 100644 (file)
@@ -1,5 +1,9 @@
 2004-04-23  Matthias Clasen  <mclasen@redhat.com>
 
+       * glib/libcharset/localcharset.c (_g_locale_get_charset_aliases): 
+       Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some
+       point.  (#139134, Piotr Klaban)
+
        * glib/gconvert.c (open_converter): Don't call g_strerror() here, 
        since it can lead to infinite recursion.  (#139133, Piotr Klaban)
 
index 9d2281e619b37b9a2ca6666da1ab3f12476544bc..a3e70a305ec8cc09bedb9d013d4c3f064c934a60 100644 (file)
@@ -1,5 +1,9 @@
 2004-04-23  Matthias Clasen  <mclasen@redhat.com>
 
+       * glib/libcharset/localcharset.c (_g_locale_get_charset_aliases): 
+       Reinstate LIBCHARSET_ALIAS_DIR support which got lost at some
+       point.  (#139134, Piotr Klaban)
+
        * glib/gconvert.c (open_converter): Don't call g_strerror() here, 
        since it can lead to infinite recursion.  (#139133, Piotr Klaban)
 
index 4dd14acc496fd5f42153e9f6a72b75318d6edb51..322dce736f1df040d3bd309cd9dc1151d642ad2a 100644 (file)
@@ -1,3 +1,7 @@
+2004-04-23  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/running.sgml: Document LIBCHARSET_ALIAS_DIR.
+
 2004-04-15  Matthias Clasen  <mclasen@redhat.com>
 
        * glib/tmpl/types.sgml: Correct the description of the
index ee2793e8b678b261f1f1ebcc07264bbab2361fc9..5b250b0e5ddccb02e016517cddc2ab943ecfc62b 100644 (file)
@@ -86,6 +86,17 @@ variables like <envar>LANG</envar>, <envar>PATH</envar> or <envar>HOME</envar>.
   </para>
 </formalpara> 
 
+<formalpara>
+  <title><envar>LIBCHARSET_ALIAS_DIR</envar></title>
+
+  <para>
+    Allows to specify a nonstandard location for the 
+    <filename>charset.aliases</filename> file that is used by the
+    character set conversion routines. The default location is the 
+    <replaceable>libdir</replaceable> specified at compilation time.
+  </para>
+</formalpara> 
+
 </refsect2>
 
 <refsect2>
index 4c8e1b920a0b1eef4d6620106eb1946752476359..2061a88b29ad0377cff3a2f16506059ead97ef89 100644 (file)
@@ -119,10 +119,13 @@ _g_locale_get_charset_aliases ()
     {
 #if !defined WIN32
       FILE *fp;
-      const char *dir = LIBDIR;
+      const char *dir = getenv ("LIBCHARSET_ALIAS_DIR");
       const char *base = "charset.alias";
       char *file_name;
 
+      if (dir == NULL)
+       dir = LIBDIR;
+
       /* Concatenate dir and base into freshly allocated file_name.  */
       {
        size_t dir_len = strlen (dir);