aboutsummaryrefslogtreecommitdiff
path: root/internal/wizard.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-08-20 15:56:43 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-08-20 15:56:43 +0300
commite537a0ee628341741f20a7d2d96ea1c4fac74c4a (patch)
tree722bb8233e62285114ca22f0b684595061229777 /internal/wizard.zsh
parenta5e9af847d7052d920a340e12b823e600ae10a9e (diff)
better utf-8 handling
Diffstat (limited to 'internal/wizard.zsh')
-rwxr-xr-xinternal/wizard.zsh3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/wizard.zsh b/internal/wizard.zsh
index b6bbd445..9941f7ed 100755
--- a/internal/wizard.zsh
+++ b/internal/wizard.zsh
@@ -5,7 +5,8 @@ setopt noaliases
() {
setopt extended_glob no_prompt_{bang,subst} prompt_{cr,percent,sp}
-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