Changing Locales on Ubuntu

The problem: 'man passwd' results in odd characters such as you'd expect if the TERM were miss-set, or if there were locale problems. Such as:

"-f  option  makes  passwd call chfn to change the userās gecos informaās"

Solution: your locale is probably set to UTF-8. You can change it to the (older but more widely supported) POSIX in a few different ways.

1) system-wide: edit /etc/environment and replace UTF-8 with POSIX. After logging out and in again, it should be fixed.

2) for an individual user: edit /home/user/.bashrc and add the environment variables for locales. Which may be as easy as adding: LOCALE=POSIX or it may require adding more of the variables which you'll see if you run locale (TODO: find out).

Related problem: you want to add a new locale, for alternate language display and such.

sudo dpkg-reconfigure locale will let you choose from available locales, and ask which locale should be default. If this is run, it will be more or less the same as:

1) editing /etc/locale.gen and adding the locale definition then running locale-gen

2) editing /etc/environment to set the locale.

-- DanielAllen - 06 Oct 2005

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2005-11-07 - DanielAllen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback