commit 09e4703574d51ac058a512ec58a127fe15995229
parent b0dfd0505447ba46b8eefadf36fb487a7fea2e98
Author: Natasha Kerensikova <natgh@instinctive.eu>
Date: Sun, 15 Dec 2024 14:19:13 +0000
UTF-8 support is done using locale(1)
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/run.sh b/src/run.sh
@@ -43,11 +43,13 @@ TREE__=' '
TREE_I='| '
TREE_T='|- '
TREE_L='`- '
-if [ -n "${LC_CTYPE-}" ] && ! [ "${LC_CTYPE}" = "${LC_CTYPE#*UTF}" ]; then
+CMAP="$(locale charmap)"
+if [ "${CMAP}" = "UTF-8" ]; then
TREE_I='│ '
TREE_T='├─ '
TREE_L='└─ '
fi
+unset CMAP
### Terminal color support
BOLD_TEXT=""