diff options
author | Matthew Burgess <matthew@linuxfromscratch.org> | 2005-04-17 11:27:20 +0000 |
---|---|---|
committer | Matthew Burgess <matthew@linuxfromscratch.org> | 2005-04-17 11:27:20 +0000 |
commit | 768efb567f48f25ee514478824bace9e3fe6698c (patch) | |
tree | 163fe648fc8cdd4fe702a48eb3617bcaa871a6ee | |
parent | 8807fbe9d1b6e331a2600d18a71bddc2d0d85dc2 (diff) |
* 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
-rw-r--r-- | chapter01/changelog.xml | 3 | ||||
-rw-r--r-- | chapter07/profile.xml | 31 |
2 files changed, 25 insertions, 9 deletions
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 2f586aea7..871003879 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -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> diff --git a/chapter07/profile.xml b/chapter07/profile.xml index fa1b1a232..7288dfb77 100644 --- a/chapter07/profile.xml +++ b/chapter07/profile.xml @@ -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 > /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> |