* Use canonical charmaps in /etc/profile and don't set LC_ALL

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4984 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Matthew Burgess 2005-04-17 11:27:20 +00:00
parent 8807fbe9d1
commit 768efb567f
2 changed files with 25 additions and 9 deletions

View File

@ -83,6 +83,9 @@ first a summary, then a detailed log.</para>
</itemizedlist>
</listitem>
<listitem><para>April 17, 2005 [matt]: Use canonical charmaps in /etc/profile
and don't set LC_ALL (Ken Moffat and Alexander Patrakov)</para></listitem>
<listitem><para>April 16, 2005 [matt]: Reword handling of hotpluggable devices
now that we install the hotplug package (Andrew Benton)</para></listitem>

View File

@ -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 &gt; /etc/profile &lt;&lt; "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>