Difference: LocaleSettings (2 vs. 3)

Revision 32010-05-05 - brodbd

Line: 1 to 1
 

Locale Settings In Linux

Dealing with multiple languages

When we start dealing with multiple character sets and languages, we get into a confusing area that's poorly understood by most American computer users. Here's a quick crash course on how to deal with these issues on our Linux cluster.

UTF-8

Changed:
<
<
Most software now understands UTF-8 by default. If your file is in UTF-8, and if the correct font is installed, you probably won't have any trouble, either in X or in a terminal.
>
>
Most software now understands UTF-8 by default, but you may need to tell Linux to send UTF-8 to your terminal for it to display foreign characters properly. Because some software still has problems with UTF-8 collations, this is currently not the system default. You can change to UTF-8 mode with the following command:
export LANG="en_US.utf8"

If your file is in UTF-8, and if the correct font is installed, you shouldn't have any trouble after doing this; it should work both in X and in a terminal. If you plan on doing a lot of UTF-8 work you may want to put the above command in your .bashrc, but note that this can cause problems for some applications; in particular, some of the scripts associated with SRILM give incorrect results in UTF-8 locales. The LANG environment variable is more thoroughly described in the section below on other character encodings.

  If you're running a text terminal program, it's the fonts on your local machine and your terminal program's understanding of the encoding that make the difference.
Line: 16 to 22
 

Emacs in X

Changed:
<
<
Emacs 22 defaults to UTF-8 encoding. If you need a different encoding, you must select this before you open the file. There are two ways to do this.
>
>
Emacs 22 defaults to UTF-8 encoding (although it will speak to your terminal in Latin1, unless you set the LANG variable as noted above.) If you need a different encoding, you must select this before you open the file. There are two ways to do this.
  You can click the Options drop-down menu, then click Mule, Set Language Encoding and choose the correct encoding. Alternatively, you can press C-x RET l. (This is Emacs-speak for Ctrl-x, the RETURN (or ENTER) key, then the lowercase L key.) Then type the name of your character encoding. Tab-completion works, so you can type a partial name and then hit tab to get a list of matches. Once the character encoding is set, you can open your file with C-x C-f or by using the File drop-down menu.
Line: 51 to 57
 and get a correct display.

locale -a will list all the valid settings for LANG that the system knows about.

Deleted:
<
<
-- DavidBrodbeck - 17 Sep 2009
 
This site is powered by the TWiki collaboration platformCopyright & by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Privacy Statement Terms & Conditions