diff options
Diffstat (limited to 'bashrc')
-rw-r--r-- | bashrc/common/locale.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bashrc/common/locale.sh b/bashrc/common/locale.sh index b337292..b75b3aa 100644 --- a/bashrc/common/locale.sh +++ b/bashrc/common/locale.sh @@ -2,10 +2,12 @@ eval unset ${!LC_*} LANG -if locale -a | grep "en_US.UTF-8" 2>&1 >/dev/null ; then - export LANG="en_US.UTF-8" -elif locale -a | grep "en_US.utf8" 2>&1 >/dev/null ; then - export LANG="en_US.utf8" +if hash locale 2>&1 >/dev/null ; then + if locale -a | grep "en_US.UTF-8" 2>&1 >/dev/null ; then + export LANG="en_US.UTF-8" + elif locale -a | grep "en_US.utf8" 2>&1 >/dev/null ; then + export LANG="en_US.utf8" + fi fi export LC_COLLATE="C" |