From 2a9fba174869b59f4ad6d4864aaaa1903e49ebff Mon Sep 17 00:00:00 2001 From: spiritLHLS <103393591+spiritLHLS@users.noreply.github.com> Date: Thu, 27 Apr 2023 11:06:28 +0800 Subject: [PATCH] Update create_ct.sh --- scripts/create_ct.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/create_ct.sh b/scripts/create_ct.sh index 30eb007..d067365 100644 --- a/scripts/create_ct.sh +++ b/scripts/create_ct.sh @@ -10,12 +10,13 @@ _green() { echo -e "\033[32m\033[01m$@\033[0m"; } _yellow() { echo -e "\033[33m\033[01m$@\033[0m"; } _blue() { echo -e "\033[36m\033[01m$@\033[0m"; } reading(){ read -rp "$(_green "$1")" "$2"; } -utf8_locale=$(locale -a 2>/dev/null | grep -i -m 1 utf8) +utf8_locale=$(locale -a 2>/dev/null | grep -i -m 1 -E "utf8|UTF-8") if [[ -z "$utf8_locale" ]]; then _yellow "No UTF-8 locale found" else export LC_ALL="$utf8_locale" export LANG="$utf8_locale" + export LANGUAGE="$utf8_locale" _green "Locale set to $utf8_locale" fi