From d971afe79263574329b54a4e63ab1d996d24ce9f Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Wed, 25 Feb 2009 13:52:08 +0000 Subject: [PATCH] Handle locale a bit (but not much) more sensibly. git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@178 6be0d1a5-5cfe-0310-89b6-964be062b18b --- .profile.d/locale.bashrc | 12 ++++++++++++ .profile.d/variables.bashrc | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .profile.d/locale.bashrc diff --git a/.profile.d/locale.bashrc b/.profile.d/locale.bashrc new file mode 100644 index 0000000..fdf0fd1 --- /dev/null +++ b/.profile.d/locale.bashrc @@ -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 diff --git a/.profile.d/variables.bashrc b/.profile.d/variables.bashrc index 774cddb..8fa34ab 100644 --- a/.profile.d/variables.bashrc +++ b/.profile.d/variables.bashrc @@ -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 -- 2.7.4