From e537a0ee628341741f20a7d2d96ea1c4fac74c4a Mon Sep 17 00:00:00 2001 From: romkatv Date: Tue, 20 Aug 2019 14:56:43 +0200 Subject: better utf-8 handling --- internal/wizard.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/wizard.zsh') 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 -- cgit v1.2.3