How to set LC_ALL=en_GB.UTF-8 in Raspbian?

11,490

Edit your /etc/locale.gen then uncomment the following line:

 en_GB.UTF-8 UTF-8

Run:

locale-gen en_GB.UTF-8 UTF-8
update-locale en_GB.UTF-8 UTF-8
export LANGUAGE=en_GB.UTF-8
export LC_ALL=en_GB.UTF-8

Verify it; locale :

LANG=en_GB.UTF-8
LANGUAGE=en_GB.UTF-8
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=en_GB.UTF-8
Share:
11,490

Related videos on Youtube

Léo Léopold Hertz 준영
Author by

Léo Léopold Hertz 준영

Updated on September 18, 2022

Comments

  • Léo Léopold Hertz 준영
    Léo Léopold Hertz 준영 over 1 year

    I know the answer in the thread How do I fix my locale issue?, by which I cannot change the fields LANGUAGE and LC_ALL to the corresponding values. I am setting up retropie in my Raspberry Pi 3B Raspbian the newest OS. My locale

    LANG=en_GB.UTF-8
    LANGUAGE= # TODO empty! but should be en_GB:en
    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= # TODO empty but should be en_GB.UTF-8
    

    OS: Raspbian
    Hardware: Raspberry Pi 3B

    • Admin
      Admin about 7 years
      @StephenKitt It is just said so in the manual of retropie, which is the only reason.
    • Admin
      Admin about 7 years
      That sounds somewhat broken (or overkill). Anyway, have you tried the fix that's mentioned in the documentation? sudo update-locale LC_ALL="en_GB.UTF-8" etc.
    • Admin
      Admin about 7 years
      @StephenKitt Yes, I have tried it unsuccessfully. It does not work.
  • Romain Vincent
    Romain Vincent about 4 years
    If you get an error starting like this perl: warning: Setting locale failed. And if the following lines mention "(unset)" variables, it is needed to set those variables before being able to execute update-locale. So to recap, the solution should be: - 1. locale-gen, - 2. export variables - 3. update-locale