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

OS

Debian

sudo dpkg-reconfigure locales
sudo dpkg-reconfigure localepurge || sudo apt-get install localepurge
dpkg -L language-env || sudo apt-get install language-env
sudo dpkg-reconfigure console-data
sudo apt-get install  localepurge  console-setup xfonts-intl-european console-terminus
grep = /etc/default/locale

LANG=en_US.UTF-8
LC_ADDRESS=fr_FR.UTF-8
LC_IDENTIFICATION=fr_FR.UTF-8
LC_MEASUREMENT=fr_FR.UTF-8
LC_MONETARY=fr_FR.UTF-8
LC_NAME=fr_FR.UTF-8
LC_NUMERIC=fr_FR.UTF-8
LC_PAPER=fr_FR.UTF-8
LC_TELEPHONE=fr_FR.UTF-8
LC_TIME=fr_FR.UTF-8

sudo sed -e 's|fr_FR|eu_US|g' -i /etc/default/locale
cat  /etc/environment
LANGUAGE="fr_FR:fr:en_GB:en"
LANG=fr_FR@euro

ERROR

ERROR / BASH

usage

sudo dpkg-reconfigure locales || apt-get install locales dialog # Enable $LANG should be enough ?

LC_ALL

LC_ALL unset ?

Q:

"locale: Cannot set LC_ALL to default locale: No such file or directory "

A:

echo $LC_ALL | grep LC_ALL || { echo "LC_ALL=en_US.UTF-8"  | sudo tee -a /etc/environment ; }
https://unix.stackexchange.com/questions/676897/debian-11-issue-with-locale-no-such-file-or-directory

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

cat /etc/environment 
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)
echo "LANG=$LANG" && 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)

echo "# LC_ALL=${LC_ALL}"
echo "# LC_CTYPE=${LC_CTYPE}"
sudo time locale-gen "${LC_ALL}"
sudo time update-locale "${LC_CTYPE}"
sudo time 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:

sudo zile /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: ?

echo "LANG=$LANG" ;  export LANG=en_US.UTF-8

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

Q:

update-locale: Error: invalid locale settings: \
LC_PAPER=eu_US.UTF-8
LC_IDENTIFICATION=eu_US.UTF-8
LC_NAME=eu_US.UTF-8
LC_NUMERIC=eu_US.UTF-8
LC_TIME=eu_US.UTF-8
LC_MEASUREMENT=eu_US.UTF-8
LC_ADDRESS=eu_US.UTF-8
LC_MONETARY=eu_US.UTF-8
LANG=en_US.UTF-8
LC_TELEPHONE=eu_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 

error : Unable to read environment locale:

    # perl: warning: Falling back to the standard locale ("C").
    # Running mktexlsr /var/lib/texmf ... done.
    # Unable to read environment locale: exit now.
   
    dpkg --configure -a

   Running mktexlsr /var/lib/texmf ... done.
Building format(s) --all.
        This may take some time... 
fmtutil failed. Output has been stored in
/tmp/fmtutil.KEPHhSCp
Please include this file if you report a bug.

dpkg: error processing package tex-common (--configure):

MORE

locale.txt · Last modified: 2023/11/28 23:08 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