Explained the benefits of setting LC_ALL properly

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3865 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Alexander E. Patrakov 2004-06-29 10:13:08 +00:00
parent 6ea075cf81
commit 181a690e52
3 changed files with 33 additions and 9 deletions

View File

@ -77,6 +77,9 @@ first a summary, then a detailed log.</para>
</itemizedlist>
</listitem>
<listitem><para>June 29, 2004 [alexander]: Explained the benefits of setting
LC_ALL properly.</para></listitem>
<listitem><para>June 28, 2004 [winkie]: Upgraded to Udev 028, and dropped the
Udev permissions patch.</para></listitem>

View File

@ -35,15 +35,34 @@ Shells.</emphasis></para>
<filename>~/.bash_profile</filename> are read when the shell is invoked
as an interactive login shell.</para>
<para>A base <filename>/etc/profile</filename> created below only sets some
environment variables necessary for Bash to accept keystrokes properly,
even in non-English locale. Replace <replaceable>[ll]</replaceable> with the
<para>A base <filename>/etc/profile</filename> created below sets some
environment variables necessary for native language support. By setting them
properly, you get:
</para>
<itemizedlist>
<listitem><para>the output of programs translated into your native
language;</para></listitem>
<listitem><para>correct classification of characters into letters, digits and
other classes - this is necessary for Bash to accept non-ASCII characters
in command lines properly in non-English locales;</para></listitem>
<listitem><para>the alphabetical sorting order correct for your
country;</para></listitem>
<listitem><para>good default paper size;</para></listitem>
<listitem><para>correct formatting of monetary, time and date
values.</para></listitem>
</itemizedlist>
<para>This script also sets the INPUTRC environment variable that makes
<application>Bash</application> and <application>Readline</application> use
the <filename>/etc/inputrc</filename> file we created earlier.</para>
<para>Replace <replaceable>[ll]</replaceable> below with the
two-letter code for your language (e.g., <quote>en</quote>) and
<replaceable>[CC]</replaceable> with the two-letter code for your country
(e.g., <quote>GB</quote>). Also you may need to specify
(and this is actually the preferred form) your
character encoding (e.g. <quote>iso8859-1</quote>) after a dot (so that the result
is <quote>en_GB.iso8859-1</quote>).
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>
@ -58,8 +77,6 @@ the following command:</para>
<screen><userinput>cat &gt; /etc/profile &lt;&lt; "EOF"
# Begin /etc/profile
# Written for Linux From Scratch
# by Alexander E. Patrakov
export LC_ALL=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>
export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>
@ -68,6 +85,10 @@ export INPUTRC=/etc/inputrc
# End /etc/profile
EOF</userinput></screen>
<note><para>The <quote>C</quote> (default) and <quote>en_US</quote>
(the recommended one for for US English users) locales are
different.</para></note>
<para>Setting the keyboard layout,
the screen font and the locale-related environment variables
are the only internationalization steps needed to support

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!ENTITY version "SVN-20040628">
<!ENTITY releasedate "June 28, 2004">
<!ENTITY version "SVN-20040629">
<!ENTITY releasedate "June 29, 2004">
<!ENTITY milestone "6.0">
<!ENTITY lfs-root "http://www.linuxfromscratch.org/">