|
@@ -60,27 +60,40 @@ environment variable that makes <application>Bash</application> and
|
|
|
<para>Replace <replaceable>[ll]</replaceable> below with the
|
|
|
two-letter code for the desired language (e.g., <quote>en</quote>) and
|
|
|
<replaceable>[CC]</replaceable> with the two-letter code for the
|
|
|
-appropriate country (e.g., <quote>GB</quote>). It may also be
|
|
|
-necessary to specify (and this is actually the preferred form) the
|
|
|
-character encoding (e.g. <quote>iso8859-1</quote>) after a dot (so
|
|
|
-that the result is <quote>en_GB.iso8859-1</quote>). Issue the
|
|
|
-following command for more information:</para>
|
|
|
-
|
|
|
-<screen><userinput>man 3 setlocale</userinput></screen>
|
|
|
+appropriate country (e.g., <quote>GB</quote>).
|
|
|
+<replaceable>[charmap]</replaceable> should be replaced with the
|
|
|
+canonical charmap for your chosen locale.</para>
|
|
|
|
|
|
<para>The list of all locales supported by Glibc can be obtained by running
|
|
|
the following command:</para>
|
|
|
|
|
|
<screen><userinput>locale -a</userinput></screen>
|
|
|
|
|
|
+<para>Locales can have a number of synonyms, e.g. <quote>ISO-8859-1</quote> is
|
|
|
+also referred to as <quote>iso8859-1</quote> and <quote>iso88591</quote>.
|
|
|
+Some applications cannot handle the various synonyms correctly, so it is safest
|
|
|
+to choose the canonical name for a particular locale. To determine the
|
|
|
+canonical name, run the following command, where
|
|
|
+<replaceable>[locale name]</replaceable> is the output given by
|
|
|
+<command>locale -a</command> for your preferred locale
|
|
|
+(<quote>en_GB.iso88591</quote> in our example).</para>
|
|
|
+
|
|
|
+<screen><userinput>LC_ALL=<replaceable>[locale name]</replaceable> locale charmap</userinput></screen>
|
|
|
+
|
|
|
+<para>For the <quote>en_GB.iso88591</quote> locale, the above command
|
|
|
+will print:</para>
|
|
|
+
|
|
|
+<screen>ISO-8859-1</screen>
|
|
|
+
|
|
|
+<para>This results in in a final locale setting of <quote>en_GB.ISO-8859-1</quote>.</para>
|
|
|
+
|
|
|
<para>Once the proper locale settings have been determined, create the
|
|
|
<filename>/etc/profile</filename> file:</para>
|
|
|
|
|
|
<screen><userinput>cat > /etc/profile << "EOF"
|
|
|
<literal># Begin /etc/profile
|
|
|
|
|
|
-export LC_ALL=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>
|
|
|
-export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>
|
|
|
+export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable>
|
|
|
export INPUTRC=/etc/inputrc
|
|
|
|
|
|
# End /etc/profile</literal>
|