Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Under Ubuntu 8.10, bash shell, the LANG and LC_ALL variables are not set:

user@machine1:~$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

Where should I set those variables so that they point to en_US.UTF-8. Once that is done, do I need to restart anything?

share|improve this question
up vote 2 down vote accepted

You can set it per user in ~/.bashrc:

export LANG=en_US.UTF-8

If you do not have that locale file installed, you can do it by

locale-gen en_US.UTF-8
share|improve this answer

LANG is set in /etc/default/locale the rest of those the LC_ stuff are locale specific variables that I believe are set by the bash. They aren't set by xterm anyway. See man locale and man setlocale for more information.

share|improve this answer

In addition to export and locale-gen; another possible way is to set it with update-locale LANG=XXX.

For en_US.UTF-8 it would be sudo update-locale LANG=en_US.UTF-8

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.