v0.9.6 Fix for UTF-8 locale check

pull/128/head v0.9.6
aristocratos 2020-05-26 21:44:54 +02:00
parent f0926b950d
commit 37c709c49d
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## v0.9.6
* Fixed: UTF-8 locale check
## v0.9.5
* Added: UTF-8 locale check and automatic LANG variable set if not UTF-8

View File

@ -58,10 +58,10 @@ shopt -qu failglob nullglob
shopt -qs extglob globasciiranges globstar
#* Check for UTF-8 locale and set LANG variable if not set
if [[ ! $LANG =~ UTF-8|utf-8 ]]; then
if [[ ! $LANG =~ UTF-8 ]]; then
for set_lang in $(locale -a); do
if [[ $set_lang =~ UTF-8|utf-8 ]]; then
declare -x LANG="${set_lang}"
if [[ $set_lang =~ utf8|UTF-8 ]]; then
declare -x LANG="${set_lang/utf8/UTF-8}"
set_lang="found"
break
fi
@ -81,7 +81,7 @@ banner=(
"██╔══██╗██╔══██║╚════██║██╔══██║ ██║ ██║ ██║██╔═══╝ "
"██████╔╝██║ ██║███████║██║ ██║ ██║ ╚██████╔╝██║ "
"╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ")
declare version="0.9.5"
declare version="0.9.6"
#* Get latest version of BashTOP from https://github.com/aristocratos/bashtop