TERM=vt100
LANG=en_US
LANGUAGE=C
LC_COLLATE=C
LESSCHARSET=latin1
$ hexdump /tmp/eacute
0000000 00e9
0000001

OS

Debian

dpkg -L language-env || sudo apt-get install language-env
sudo dpkg-reconfigure console-data
sudo dpkg-reconfigure locales
sudo dpkg-reconfigure localepurge
sudo apt-get install  localepurge  console-setup xfonts-intl-european console-terminus
cat  /etc/environment
LANGUAGE="fr_FR:fr:en_GB:en"
LANG=fr_FR@euro

ERROR

ERROR / BASH

bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory

cp -av /etc/environment /etc/environment._$(date +%s).bak

. /etc/environment
echo "LC_ALL=${LC_ALL}" # LC_ALL=en_US.UTF-8
sudo dpkg-reconfigure locales || apt-get install locales dialog # Enable $LANG should be enough ?
. /etc/environment
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
sudo locale-gen $LANG
bash 
. /etc/environment

Ok on debian:10

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

echo "LANG=$LANG"
fr_FR.UTF-8
sudo dpkg-reconfigure locales  # Enable $LANG should be enough ?
sudo locale-gen $LANG
grep -v '^#'  /etc/locale.gen
en_US ISO-8859-1
en_US.ISO-8859-15 ISO-8859-15
en_US.UTF-8 UTF-8
cat /etc/locale.conf

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

sudo locale-gen ${LC_ALL}
sudo update-locale ${LC_CTYPE}
sudo dpkg-reconfigure locales  # Enable $LANG should be enough ?

Q: perl: warning: Falling back to the standard locale ("C").

perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
sudo dpkg-reconfigure locales  # Enable $LANG should be enough ?

Q: perl: warning: Please check that your locale settings:

perl: warning: Please check that your locale settings:
      LANGUAGE = (unset),
      LC_ALL = (unset),
      LC_CTYPE = "en_US.UTF8",
      LANG = "C"

Observe

cat /etc/environment # was empty

Try:

cat /etc/environment
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8

Q:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
      LANGUAGE = "",
      LC_ALL = (unset),

A:

sudo dpkg-reconfigure localepurge

Q:

Please use a locale setting which supports UTF-8 (such as LANG=en_US.UTF-8).

A: ?

export LANG=en_US.UTF-8

cat /etc/environment
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8

mosh :

mosh-server needs a UTF-8 native locale to run.

# @ target:

locale
#| LANG=


A:

sudo dpkg-reconfigure locales # en_US.UTF-8 or C.UTF-8 ?
locale
#| LANG=en_US.UTF-8

locale: Cannot set LC_CTYPE to default locale: No such file or directory

echo $LC_CTYPE
en_US
sudo dpkg-reconfigure locales # en_US.UTF-8 or C.UTF-8 ?
sudo locale-gen

update-locale

cat /etc/default/locale
#  File generated by update-locale
LANGUAGE=fr_FR.UTF-8
LANG=en_US.UTF-8
LC_MESSAGES=fr_FR.UTF-8
LC=fr_FR.UTF-8

root@arm:~# sed -e 's|fr_FR|en_US|g' -i /etc/default/locale
root@arm:~# . /etc/default/locale
root@arm:~# update-locale 

MORE

locale.txt · Last modified: 2020/10/15 20:30 by rzr
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki