From dc8576c1a1d883d600631dd26227ffa8e569cb72 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 17 Mar 2026 14:32:38 -0600 Subject: [PATCH] bootstrap: Support nonstandard locales Some newer systems use e.g. LANG=C.utf8, which is breaking bootstrap since it expects to see e.g. C.utf-8. Instead of trying to parse the values, simply split on '.' and append 'utf-8'. Signed-off-by: Zack Cerza --- bootstrap | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bootstrap b/bootstrap index 8990d8781..56c451ef1 100755 --- a/bootstrap +++ b/bootstrap @@ -106,9 +106,11 @@ if [ -f "$VENV/pyvenv.cfg" ]; then sed -i'' -e 's/\(include-system-site-packages\s*=\s*\)true/\1false/g' $VENV/pyvenv.cfg fi -# Attempt to force a UTF-8 locale without being specific to English -export LANG=${LANG:-C.UTF-8} -(echo $LANG | grep -qi utf-8) || export LC_ALL=$LANG.UTF-8 +# Attempt to force a UTF-8 locale without forcing English +LANG=${LANG:=C} +LC_ALL=${LC_ALL:=C} +export LANG="${LANG/.*/}.utf-8" +export LC_ALL="${LC_ALL/.*/}.utf-8" if [ -z "$NO_CLOBBER" ] && \ [ ! -e "$VENV/bin/pip" -o ! -e "$VENV/bin/$PYTHON" ] || \ -- 2.47.3