Generate en_US.UTF-8 during install

This commit is contained in:
Alexandre Aubin 2019-01-17 17:25:56 +01:00 committed by GitHub
parent 22ed77c23b
commit 7a7211fae9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -432,6 +432,12 @@ function restart_services() {
}
function fix_locales() {
# This function tries to fix the whole locale and perl mess about missing locale files
# Generate at least en_US.UTF-8
sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && locale-gen
# If no /etc/environment exists, default to en_US.UTF-8
[ "$(grep LC_ALL /etc/environment)" ] || echo 'LC_ALL="en_US.UTF-8"' >> /etc/environment
source /etc/environment
export LC_ALL