summaryrefslogtreecommitdiffstats
path: root/source/l/glib2/libglib2.csh
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/glib2/libglib2.csh')
-rw-r--r--source/l/glib2/libglib2.csh5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/l/glib2/libglib2.csh b/source/l/glib2/libglib2.csh
index a1b675615..c598e193a 100644
--- a/source/l/glib2/libglib2.csh
+++ b/source/l/glib2/libglib2.csh
@@ -14,9 +14,8 @@
# If this environment variable is set, GLib assumes that filenames are
# in the locale encoding rather than in UTF-8.
-# If the LANG you have set contains any form of "UTF", we will guess you are
-# using a UTF-8 locale. Hopefully we're correct.
-echo $LANG | grep -iq UTF
+# Determine if the locale is UTF-8:
+locale charmap 2> /dev/null | grep -q UTF-8
if ($status == 0) then
setenv G_FILENAME_ENCODING "@locale"
endif