Fix locale issue when in SSH characters are not displayed correctly on Debian 10

Authmane Terki
1 min readNov 17, 2019

--

I had this error:

$ ls
Corriges unsorted/ FA/ FA calcul litt
Corrig??s 11H.zip

Output of locale :

$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

To solve this problem temporarily run:

$ export LC_ALL="en_GB.UTF-8"
$ ls
Corriges unsorted/ FA/ FA calcul litt
Corrigées 11H.zip

To solve it permanently, run:

sudo dpkg-reconfigure locales

Then logout and login back (even if some errors may have already gone).

--

--

Authmane Terki
Authmane Terki

No responses yet