Make nonint do_change_locale work with encoding field as well (#167)

This commit is contained in:
garyk10 authored and GitHub committed 2022-01-04 15:10:56 +00:00
1 parent 20a4cee6e5
commit 26e568102f
1 file changed
+1 -1
+1 -1
View File
@@ -492,7 +492,7 @@ do_change_locale() {
dpkg-reconfigure locales dpkg-reconfigure locales
else else
local LOCALE="$1" 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 return 1
fi fi
local ENCODING="$(echo $LOCALE_LINE | cut -f2 -d " ")" local ENCODING="$(echo $LOCALE_LINE | cut -f2 -d " ")"