mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-05 22:04:48 +00:00
* Use canonical charmaps in /etc/profile and don't set LC_ALL (merge r4984 from trunk)
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/6.1/BOOK@4985 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
fd698d8f2e
commit
411697db8a
@ -82,6 +82,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>
|
||||
|
||||
|
@ -60,13 +60,9 @@ 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>
|
||||
@ -75,14 +71,31 @@ the following command:</para>
|
||||
|
||||
<beginpage/>
|
||||
|
||||
<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>
|
||||
|
Loading…
Reference in New Issue
Block a user