better utf-8 handling
This commit is contained in:
parent
a5e9af847d
commit
e537a0ee62
5 changed files with 21 additions and 16 deletions
|
@ -16,7 +16,8 @@ fi
|
|||
() {
|
||||
emulate -L zsh
|
||||
setopt no_unset
|
||||
if [[ ${LC_ALL:-${LANG:-}} != *.(utf|UTF)(-|)8 ]]; then
|
||||
zmodload zsh/langinfo
|
||||
if [[ ${langinfo[CODESET]:-} != (utf|UTF)(-|)8 ]]; then
|
||||
local LC_ALL=${${(@M)$(locale -a):#*.(utf|UTF)(-|)8}[1]:-en_US.UTF-8}
|
||||
fi
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@ fi
|
|||
() {
|
||||
emulate -L zsh
|
||||
setopt no_unset
|
||||
if [[ ${LC_ALL:-${LANG:-}} != *.(utf|UTF)(-|)8 ]]; then
|
||||
zmodload zsh/langinfo
|
||||
if [[ ${langinfo[CODESET]:-} != (utf|UTF)(-|)8 ]]; then
|
||||
local LC_ALL=${${(@M)$(locale -a):#*.(utf|UTF)(-|)8}[1]:-en_US.UTF-8}
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue