aboutsummaryrefslogtreecommitdiffstats
path: root/chapter07
diff options
context:
space:
mode:
authorAlexander E. Patrakov <alexander@linuxfromscratch.org>2004-06-29 10:13:08 +0000
committerAlexander E. Patrakov <alexander@linuxfromscratch.org>2004-06-29 10:13:08 +0000
commit181a690e52aa4d67842e3945ae2640ab9911f5c8 (patch)
tree60bf8898f82d08e209d8555da2956e96a8ee184c /chapter07
parent6ea075cf81d75ae3cf98c5b984710f8c650c7ab4 (diff)
Explained the benefits of setting LC_ALL properly
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3865 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter07')
-rw-r--r--chapter07/profile.xml35
1 files changed, 28 insertions, 7 deletions
diff --git a/chapter07/profile.xml b/chapter07/profile.xml
index 2ec314397..731dff0fc 100644
--- a/chapter07/profile.xml
+++ b/chapter07/profile.xml
@@ -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