From 768efb567f48f25ee514478824bace9e3fe6698c Mon Sep 17 00:00:00 2001 From: Matthew Burgess Date: Sun, 17 Apr 2005 11:27:20 +0000 Subject: * 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 --- chapter01/changelog.xml | 3 +++ 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. +April 17, 2005 [matt]: Use canonical charmaps in /etc/profile +and don't set LC_ALL (Ken Moffat and Alexander Patrakov) + April 16, 2005 [matt]: Reword handling of hotpluggable devices now that we install the hotplug package (Andrew Benton) 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 Bash and Replace [ll] below with the two-letter code for the desired language (e.g., en) and [CC] with the two-letter code for the -appropriate country (e.g., GB). It may also be -necessary to specify (and this is actually the preferred form) the -character encoding (e.g. iso8859-1) after a dot (so -that the result is en_GB.iso8859-1). Issue the -following command for more information: - -man 3 setlocale +appropriate country (e.g., GB). +[charmap] should be replaced with the +canonical charmap for your chosen locale. The list of all locales supported by Glibc can be obtained by running the following command: locale -a +Locales can have a number of synonyms, e.g. ISO-8859-1 is +also referred to as iso8859-1 and iso88591. +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 +[locale name] is the output given by +locale -a for your preferred locale +(en_GB.iso88591 in our example). + +LC_ALL=[locale name] locale charmap + +For the en_GB.iso88591 locale, the above command +will print: + +ISO-8859-1 + +This results in in a final locale setting of en_GB.ISO-8859-1. + Once the proper locale settings have been determined, create the /etc/profile file: cat > /etc/profile << "EOF" # Begin /etc/profile -export LC_ALL=[ll]_[CC] -export LANG=[ll]_[CC] +export LANG=[ll]_[CC].[charmap] export INPUTRC=/etc/inputrc # End /etc/profile -- cgit v1.2.3-54-g00ecf