Comment 2 for bug 8256

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Mon, 20 Sep 2004 12:25:55 +0200
From: Laurent Martelli <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: libglib2.0-0: Shouldn't require to set G_FILENAME_ENCODING in non UTF-8
 locale

Package: libglib2.0-0
Version: 2.4.6-2
Severity: serious
Tags: patch
Justification: Policy 9.9

Unless the environment G_BROKEN_FILENAMES is or G_FILENAME_ENCODING is
set to "@locale", the encoding used fr filenames is utf-8 regardless
of the encoding of the locale, which in my opinion is not a
"reasonable default". Here's a patch to use the locale's encoding if
G_FILENAME_ENCODING is not set.

--- glib-2.4.6/glib/gconvert.c 2004-09-20 12:20:31.000000000 +0200
+++ glib-2.4.6-deb/glib/gconvert.c 2004-09-20 12:20:09.000000000 +0200
@@ -1069,16 +1069,12 @@
              cache->is_utf8 = (strcmp (cache->filename_charset, "UTF-8") == 0);
            }
        }
- else if (getenv ("G_BROKEN_FILENAMES") != NULL)
+ else
        {
          cache->is_utf8 = g_get_charset (&new_charset);
          cache->filename_charset = g_strdup (new_charset);
        }
- else
- {
- cache->filename_charset = g_strdup ("UTF-8");
- cache->is_utf8 = TRUE;
- }
+
     }

   if (filename_charset)

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.26
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (ignored: LC_ALL set to fr_FR@euro)

Versions of packages libglib2.0-0 depends on:
ii libc6 2.3.2.ds1-13 GNU C Library: Shared libraries an

-- no debconf information