diff options
author | Alexander E. Patrakov <alexander@linuxfromscratch.org> | 2004-06-29 10:13:08 +0000 |
---|---|---|
committer | Alexander E. Patrakov <alexander@linuxfromscratch.org> | 2004-06-29 10:13:08 +0000 |
commit | 181a690e52aa4d67842e3945ae2640ab9911f5c8 (patch) | |
tree | 60bf8898f82d08e209d8555da2956e96a8ee184c | |
parent | 6ea075cf81d75ae3cf98c5b984710f8c650c7ab4 (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
-rw-r--r-- | chapter01/changelog.xml | 3 | ||||
-rw-r--r-- | chapter07/profile.xml | 35 | ||||
-rw-r--r-- | general.ent | 4 |
3 files changed, 33 insertions, 9 deletions
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 4c39811c0..4c083f41f 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -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> 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 > /etc/profile << "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 diff --git a/general.ent b/general.ent index 28c8bce40..b6f0517a7 100644 --- a/general.ent +++ b/general.ent @@ -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/"> |