Use C locale in containers
This commit is contained in:
parent
dffe427054
commit
0e54aecd61
1 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Start from known core "C" locale. This will get overwritten later.
|
# Start from known core "C" locale. This will get overwritten later.
|
||||||
export LANG=C
|
export LANG=C.UTF-8
|
||||||
|
|
||||||
# Set up XDG variables. See:
|
# Set up XDG variables. See:
|
||||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||||
|
@ -23,11 +23,11 @@ if [ ! -d "$HOME/.local/bin" ] ; then install -d -m 0700 "$HOME/.local/bin" ; fi
|
||||||
# Locale and language.
|
# Locale and language.
|
||||||
## Clear the existing locale settings and set options I always want.
|
## Clear the existing locale settings and set options I always want.
|
||||||
export TZ=Europe/London # Can override this elsewhere if needed.
|
export TZ=Europe/London # Can override this elsewhere if needed.
|
||||||
if ! [ -f "$XDG_CONFIG_HOME/locale.conf" ] && [ -x /usr/bin/locale ]
|
if ! [ -f /run/.containerenv ] && ! [ -f "$XDG_CONFIG_HOME/locale.conf" ] && [ -x /usr/bin/locale ]
|
||||||
then
|
then
|
||||||
LANG="en_US.UTF-8" /usr/bin/locale > "$XDG_CONFIG_HOME/locale.conf"
|
LANG="en_US.UTF-8" /usr/bin/locale > "$XDG_CONFIG_HOME/locale.conf"
|
||||||
fi
|
fi
|
||||||
if [ -r "$XDG_CONFIG_HOME/locale.conf" ]
|
if ! [ -f /run/.containerenv ] && [ -r "$XDG_CONFIG_HOME/locale.conf" ]
|
||||||
then
|
then
|
||||||
. "$XDG_CONFIG_HOME/locale.conf"
|
. "$XDG_CONFIG_HOME/locale.conf"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue