r699 - in trunk/BOOK: bootscripts/common final-system/common introduction/common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sun Nov 13 02:26:06 PST 2005


Author: manuel
Date: 2005-11-13 03:26:01 -0700 (Sun, 13 Nov 2005)
New Revision: 699

Modified:
   trunk/BOOK/bootscripts/common/profile.xml
   trunk/BOOK/final-system/common/glibc.xml
   trunk/BOOK/introduction/common/changelog.xml
Log:
Improve the heuristic for determining a locale that is supported by both Glibc and packages outside LFS.

Modified: trunk/BOOK/bootscripts/common/profile.xml
===================================================================
--- trunk/BOOK/bootscripts/common/profile.xml	2005-11-13 10:06:29 UTC (rev 698)
+++ trunk/BOOK/bootscripts/common/profile.xml	2005-11-13 10:26:01 UTC (rev 699)
@@ -94,9 +94,48 @@
 
 <screen><computeroutput>ISO-8859-1</computeroutput></screen>
 
-  <para>This results in a final locale setting of
-  <quote>en_GB.ISO-8859-1</quote>.</para>
+  <para>This results in a final locale setting of <quote>en_GB.ISO-8859-1</quote>.
+  It is important that the locale found using the heuristic above is tested prior
+  to it being added to the Bash startup files:</para>
 
+<screen><userinput>LC_ALL=[locale name] locale country
+LC_ALL=[locale name] locale language
+LC_ALL=[locale name] locale charmap
+LC_ALL=[locale name] locale int_curr_symbol
+LC_ALL=[locale name] locale int_prefix</userinput></screen>
+
+  <para>The above commands should print the country and language names, the
+  character encoding used by the locale, the local currency and the prefix
+  to dial before the telephone number in order to get into the country. If
+  any of the commands above fail with a message similar to the one shown
+  below, this means that your locale was either not installed in Chapter 6
+  or is not supported by the default installation of Glibc.</para>
+
+<screen><computeroutput>locale: Cannot set LC_* to default locale: No such file or directory</computeroutput></screen>
+
+  <para>If this happens, you should either install the desired locale using
+  the <command>localedef</command> command, or consider choosing a different
+  locale. Further instructions assume that there are no such error messages
+  from Glibc.</para>
+
+  <para>Some packages beyond LFS may also lack support for your chosen locale.
+  One example is the X library (part of the X Window System), which outputs
+  the following error message:</para>
+
+<screen><computeroutput>Warning: locale not supported by Xlib, locale set to C</computeroutput></screen>
+
+  <para>Sometimes it is possible to fix this by removing the charmap part of
+  the locale specification, as long as that does not change the character map
+  that Glibc associates with the locale (this can be checked by running the
+  <command>locale charmap</command> command in both locales). For example,
+  one would have to change "de_DE.ISO-8859-15 at euro" to
+  "de_DE at euro" in order to get this locale recognized by Xlib.</para>
+
+  <para>Other packages can also function incorrectly (but may not necessarily
+  display any error messages) if the locale name does not meet their expectations.
+  In those cases, investigating how other Linux distributions support your locale
+  might provide some useful information.</para>
+
   <para>Once the proper locale settings have been determined, create the
   <filename>/etc/profile</filename> file:</para>
 

Modified: trunk/BOOK/final-system/common/glibc.xml
===================================================================
--- trunk/BOOK/final-system/common/glibc.xml	2005-11-13 10:06:29 UTC (rev 698)
+++ trunk/BOOK/final-system/common/glibc.xml	2005-11-13 10:26:01 UTC (rev 699)
@@ -156,7 +156,8 @@
 <screen><userinput>make localedata/install-locales</userinput></screen>
 
     <para>To save time, an alternative to running the previous command (which
-    generates and installs every locale Glibc is aware of) is to install only
+    generates and installs every locale listed in the
+    glibc-&glibc-version;/localedata/SUPPORTED file) is to install only
     those locales that are wanted and needed. This can be achieved by using
     the <command>localedef</command> command. Information on this command is
     located in the <filename>INSTALL</filename> file in the Glibc source.
@@ -188,11 +189,12 @@
     that utilize multibyte character sets (including UTF-8) or right-to-left
     writing order.  Numerous unofficial and unstable patches are required to
     fix these problems, and it has been decided by the LFS developers not to
-    support such complex locales.  This applies to the ja_JP and fa_IR locales
-    as well—they have been installed only for GCC and Gettext tests to
-    pass, and the <command>watch</command> program (part of the Procps package)
-    does not work properly in them. Various attempts to circumvent these
-    restrictions are documented in internationalization-related hints.</para>
+    support such complex locales at this time. This applies to the ja_JP and
+    fa_IR locales as well—they have been installed only for GCC and
+    Gettext tests to pass, and the <command>watch</command> program (part of
+    the Procps package) does not work properly in them. Various attempts to
+    circumvent these restrictions are documented in internationalization-related
+    hints.</para>
 
   </sect2>
 

Modified: trunk/BOOK/introduction/common/changelog.xml
===================================================================
--- trunk/BOOK/introduction/common/changelog.xml	2005-11-13 10:06:29 UTC (rev 698)
+++ trunk/BOOK/introduction/common/changelog.xml	2005-11-13 10:26:01 UTC (rev 699)
@@ -40,6 +40,11 @@
       <para>November 13, 2005</para>
       <itemizedlist>
         <listitem>
+          <para>[manuel] - Improve the heuristic for determining a locale that
+          is supported by both Glibc and packages outside LFS. Ported from
+          LFS-SVN.</para>
+        </listitem>
+        <listitem>
           <para>[manuel] - Omit running Bzip2's testsuite as a separate step,
           as make runs it automatically. Ported from LFS-SVN.</para>
         </listitem>




More information about the cross-lfs mailing list