Handle locale a bit (but not much) more sensibly.
authorIain Patterson <me@iain.cx>
Wed, 25 Feb 2009 13:52:08 +0000 (13:52 +0000)
committerIain Patterson <me@iain.cx>
Wed, 25 Feb 2009 13:52:08 +0000 (13:52 +0000)
git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@178 6be0d1a5-5cfe-0310-89b6-964be062b18b

.profile.d/locale.bashrc [new file with mode: 0644]
.profile.d/variables.bashrc

diff --git a/.profile.d/locale.bashrc b/.profile.d/locale.bashrc
new file mode 100644 (file)
index 0000000..fdf0fd1
--- /dev/null
@@ -0,0 +1,12 @@
+# $Id$
+
+unset LANG LC_ALL
+
+for locale in en_GB.UTF-8 en_GB; do
+  if locale -a 2>/dev/null | grep "^$locale\$" >/dev/null; then
+    export LC_CTYPE=$locale
+    break
+  fi
+done
+
+unset locale
index 774cddb..8fa34ab 100644 (file)
@@ -3,7 +3,6 @@ export SSHTERM=urxvtc
 export SSHTERM_TITLE=-title
 export SSHTERM_EXEC=-e
 unset LANG
-export LC_CTYPE=en_GB
 if ls --help 2>/dev/null | grep gnu.org >/dev/null; then
   export LS_OPTIONS="--color=auto -F -b --time-style=long-iso"
 elif [ "$SYSTEM" = "Darwin" ]; then