From 26e568102f633ee42deb403c6b2cc62194bfed0b Mon Sep 17 00:00:00 2001 From: garyk10 <52009419+garyk10@users.noreply.github.com> Date: Tue, 4 Jan 2022 10:10:56 -0500 Subject: [PATCH] Make nonint do_change_locale work with encoding field as well (#167) --- raspi-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raspi-config b/raspi-config index bfb4e9f..c9eff05 100755 --- a/raspi-config +++ b/raspi-config @@ -492,7 +492,7 @@ do_change_locale() { dpkg-reconfigure locales else local LOCALE="$1" - if ! LOCALE_LINE="$(grep "^$LOCALE " /usr/share/i18n/SUPPORTED)"; then + if ! LOCALE_LINE="$(grep -E "^$LOCALE( |$)" /usr/share/i18n/SUPPORTED)"; then return 1 fi local ENCODING="$(echo $LOCALE_LINE | cut -f2 -d " ")"