diff options
| -rw-r--r-- | lib/misc.zsh | 14 | 
1 files changed, 12 insertions, 2 deletions
| diff --git a/lib/misc.zsh b/lib/misc.zsh index ea8a05fcb..6987c099c 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -9,11 +9,21 @@ setopt long_list_jobs  export PAGER="less"  export LESS="-R" -export LC_CTYPE=$LANG -  ## super user alias  alias _='sudo'  alias please='sudo'  ## more intelligent acking for ubuntu users  alias afind='ack-grep -il' + +## how to interpret text characters +if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then # only define if undefined +	export LC_CTYPE=${LANG%%:*}                 # pick the first entry from LANG +	[[ -z "$LC_CTYPE" ]] && \ +		export LC_CTYPE=`locale -a | grep en_US.utf8 | head -1` +	[[ -z "$LC_CTYPE" ]] && \ +		export LC_CTYPE=`locale -a | grep en_US | head -1` +	[[ -z "$LC_CTYPE" ]] && \ +		export LC_CTYPE=C                         # default to internal encoding. +fi + | 
