diff options
author | Matthew Burgess <matthew@linuxfromscratch.org> | 2005-11-12 09:34:32 +0000 |
---|---|---|
committer | Matthew Burgess <matthew@linuxfromscratch.org> | 2005-11-12 09:34:32 +0000 |
commit | c45b780761ea397cd8a6a008eaa179c7102679dc (patch) | |
tree | 9ef057beeec5179e0974758582f73f9a52e9fc5c /chapter07/profile.xml | |
parent | 4ebf97c614dd1c29c10f3acc19aa3e9a2a1dc11b (diff) |
Improve the heuristic for selecting a supported/working locale
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7143 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter07/profile.xml')
-rw-r--r-- | chapter07/profile.xml | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/chapter07/profile.xml b/chapter07/profile.xml index 5748762cb..270142a1a 100644 --- a/chapter07/profile.xml +++ b/chapter07/profile.xml @@ -83,7 +83,46 @@ will print:</para> <screen>ISO-8859-1</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> + +<para><computeroutput>locale: Cannot set LC_* to default locale: No such file or directory</computeroutput></para> + +<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> + +<para><computeroutput>Warning: locale not supported by Xlib, locale set to C</computeroutput></para> + +<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@euro" to +"de_DE@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> |