diff options
author | Jeremy Huntwork <jhuntwork@linuxfromscratch.org> | 2006-01-06 01:59:08 +0000 |
---|---|---|
committer | Jeremy Huntwork <jhuntwork@linuxfromscratch.org> | 2006-01-06 01:59:08 +0000 |
commit | fa21b3dc894b9964620968dfae6685d69ce89fb9 (patch) | |
tree | 2353b9af8cae48156b98e651873d483e994e352a /chapter07/profile.xml | |
parent | 60e34b52810dd47567ca18aa2c86fe4cd7c9fd01 (diff) |
Initial support of UTF-8. Thanks Alexander Patrakov.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7245 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter07/profile.xml')
-rw-r--r-- | chapter07/profile.xml | 48 |
1 files changed, 31 insertions, 17 deletions
diff --git a/chapter07/profile.xml b/chapter07/profile.xml index dd53a5141..e2748d9df 100644 --- a/chapter07/profile.xml +++ b/chapter07/profile.xml @@ -69,17 +69,20 @@ 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>). <replaceable>[charmap]</replaceable> should - be replaced with the canonical charmap for your chosen locale.</para> + be replaced with the canonical charmap for your chosen locale. Optional + modifiers such as <quote>@euro</quote> may also be present.</para> <para>The list of all locales supported by Glibc can be obtained by running the following command:</para> <screen role="nodump"><userinput>locale -a</userinput></screen> - <para>Locales can have a number of synonyms, e.g. <quote>ISO-8859-1</quote> + <para>Charmaps can have a number of aliases, 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 + Some applications cannot handle the various synonyms correctly (e.g., require + that <quote>UTF-8</quote> is written as <quote>UTF-8</quote>, not + <quote>utf8</quote>), so it is safest in most + cases 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> @@ -115,6 +118,7 @@ LC_ALL=[locale name] locale int_prefix</userinput></screen> Further instructions assume that there are no such error messages from Glibc.</para> + <!-- FIXME: the xlib example will became obsolete real soon --> <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> @@ -139,23 +143,33 @@ LC_ALL=[locale name] locale int_prefix</userinput></screen> <screen><userinput>cat > /etc/profile << "EOF" <literal># Begin /etc/profile -export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable> +export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable><replaceable>[@modifiers]</replaceable> export INPUTRC=/etc/inputrc # End /etc/profile</literal> EOF</userinput></screen> - <note> - <para>The <quote>C</quote> (default) and <quote>en_US</quote> (the - recommended one for United States English users) locales are different.</para> - </note> - - <para>Setting the keyboard layout, screen font, and locale-related environment - variables are the only internationalization steps needed to support locales - that use ordinary single-byte encodings and left-to-right writing direction. - More complex cases (including UTF-8 based locales) require additional steps - and additional patches because many applications tend to not work properly - under such conditions. These steps and patches are not included in the LFS - book and such locales are not yet supported by LFS.</para> + <para>The <quote>C</quote> (default) and <quote>en_US</quote> (the recommended + one for United States English users) locales are different. <quote>C</quote> + uses the US-ASCII 7-bit character set, and treats bytes with the high bit set + as invalid characters. That's why, e.g., the <command>ls</command> command + substitutes them with question marks in that locale. Also, an attempt to send + mail with such characters from Mutt or Pine results in non-RFC-conforming + messages being sent (the charset in the outgoing mail is indicated as <quote>unknown + 8-bit</quote>). So you can use the <quote>C</quote> locale only if you are sure that + you will never need 8-bit characters.</para> + + <para>UTF-8 based locales are not supported well by many programs. E.g., the + <command>watch</command> program displays only ASCII characters in UTF-8 + locales and has no such restriction in traditional 8-bit locales like en_US. + Without patches and/or installing software beyond BLFS, in UTF-8 based locales + you will not be able to do such basic tasks as printing plain-text files from + the command line, recording Windows-readable CDs with filenames containing + non-ASCII characters, viewing ID3v1 tags in MP3 files and so on. Work is in + progress to document and, if possible, fix such problems, see + <ulink url="&blfs-root;view/svn/introduction/locale-issues.html"/>. + It is, however, safe to use UTF-8 based locales if you are going to use only + KDE or GNOME and never open the terminal.</para> + <!-- All abovementioned problems except "watch" have a known fix beyond BLFS --> </sect1> |