Ignore:
Timestamp:
04/17/2005 11:27:20 AM (19 years ago)
Author:
Matthew Burgess <matthew@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
f9bd7b2
Parents:
8807fbe
Message:
  • 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/profile.xml

    r8807fbe r768efb56  
    6161two-letter code for the desired language (e.g., <quote>en</quote>) and
    6262<replaceable>[CC]</replaceable> with the two-letter code for the
    63 appropriate country (e.g., <quote>GB</quote>). It may also be
    64 necessary to specify (and this is actually the preferred form) the
    65 character encoding (e.g.  <quote>iso8859-1</quote>) after a dot (so
    66 that the result is <quote>en_GB.iso8859-1</quote>).  Issue the
    67 following command for more information:</para>
    68 
    69 <screen><userinput>man 3 setlocale</userinput></screen>
     63appropriate country (e.g., <quote>GB</quote>).
     64<replaceable>[charmap]</replaceable> should be replaced with the
     65canonical charmap for your chosen locale.</para>
    7066
    7167<para>The list of all locales supported by Glibc can be obtained by running
     
    7369
    7470<screen><userinput>locale -a</userinput></screen>
     71
     72<para>Locales can have a number of synonyms, e.g. <quote>ISO-8859-1</quote> is
     73also referred to as <quote>iso8859-1</quote> and <quote>iso88591</quote>.
     74Some applications cannot handle the various synonyms correctly, so it is safest
     75to choose the canonical name for a particular locale.  To determine the
     76canonical name, run the following command, where
     77<replaceable>[locale name]</replaceable> is the output given by
     78<command>locale -a</command> for your preferred locale
     79(<quote>en_GB.iso88591</quote> in our example).</para>
     80
     81<screen><userinput>LC_ALL=<replaceable>[locale name]</replaceable> locale charmap</userinput></screen>
     82
     83<para>For the <quote>en_GB.iso88591</quote> locale, the above command
     84will print:</para>
     85
     86<screen>ISO-8859-1</screen>
     87
     88<para>This results in in a final locale setting of <quote>en_GB.ISO-8859-1</quote>.</para>
    7589
    7690<para>Once the proper locale settings have been determined, create the
     
    8094<literal># Begin /etc/profile
    8195
    82 export LC_ALL=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>
    83 export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>
     96export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable>
    8497export INPUTRC=/etc/inputrc
    8598
Note: See TracChangeset for help on using the changeset viewer.