diff options
author | Zack Winkles <winkie@linuxfromscratch.org> | 2004-05-06 16:22:04 +0000 |
---|---|---|
committer | Zack Winkles <winkie@linuxfromscratch.org> | 2004-05-06 16:22:04 +0000 |
commit | b32e80330973383d4eca995d6193e35a743176cd (patch) | |
tree | c657760bd2b5c756d0371c908425ecc5835e90ca /chapter06 | |
parent | 4dc8dc63eef4a0b4e70ffa3ff12d8678a6a81e92 (diff) |
Committed Alexander's i18n patch
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3489 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06')
-rw-r--r-- | chapter06/glibc.xml | 19 | ||||
-rw-r--r-- | chapter06/kbd.xml | 42 | ||||
-rw-r--r-- | chapter06/man.xml | 29 | ||||
-rw-r--r-- | chapter06/sysvinit.xml | 22 |
4 files changed, 69 insertions, 43 deletions
diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml index 9296458e5..6fd2b5fb8 100644 --- a/chapter06/glibc.xml +++ b/chapter06/glibc.xml @@ -111,6 +111,25 @@ localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro localedef -i it_IT -f ISO-8859-1 it_IT localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen> +<para>In fact, some locales installed by the +<command>make localedata/install-locales</command> +command above are not properly +supported by some applications that are in LFS and BLFS books. Because +of various problems that arise +due to application programmers making +assumptions that break in such locales, LFS <emphasis>should not</emphasis> +be used in locales 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 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 e.g. <application>vim</application> +compiled according to this book doesn't work properly in them. +Various attempts to circumvent these +restrictions are documented in internationalization-related hints.</para> + <para>Finally, build the linuxthreads man pages, which are a great reference on the threading API (applicable to NPTL as well):</para> diff --git a/chapter06/kbd.xml b/chapter06/kbd.xml index 0f644bfb5..edc0abb1a 100644 --- a/chapter06/kbd.xml +++ b/chapter06/kbd.xml @@ -36,41 +36,8 @@ Diffutils, Flex, GCC, Gettext, Glibc, Grep, Gzip, M4, Make, Sed.</para> </sect2> -<sect2 id="conf-kbd"><title>Configuring your keyboard</title> -<indexterm zone="conf-kbd"> -<primary sortas="a-Kbd">Kbd</primary> -<secondary>configuring</secondary></indexterm> - -<para>Few things are more annoying than using Linux while a wrong keymap -for your keyboard is loaded. If you have a standard US keyboard, however, you -can skip this section, as the US keymap is the default as long as you don't -change it.</para> - -<para>To change the default keymap, create the -<filename class="symlink">/usr/share/kbd/keymaps/defkeymap.map.gz</filename> -symlink by running the following command:</para> - -<screen><userinput>ln -s path/to/keymap /usr/share/kbd/keymaps/defkeymap.map.gz</userinput></screen> - -<para>Of course, replace <filename>path/to/keymap</filename> with the path and -name of your keyboard's map file. For example, if you have a Dutch keyboard, -you would use <filename>/usr/share/kbd/keymaps/i386/qwerty/nl.map.gz</filename>.</para> - -<para>Another way to set your keyboard's layout is to compile the keymap -into the kernel. This ensures that your keyboard will always work as expected, -even when you boot into maintenance mode (by passing `init=/bin/sh' to the -kernel), as then the bootscript that normally sets up your keymap isn't run.</para> - -<para>When in <xref linkend="chapter-bootable"/> you're ready to compile the -kernel, run the following command to patch the current default keymap into the -source (you will have to repeat this command whenever you unpack a new -kernel):</para> - -<screen><userinput>loadkeys -m /usr/share/kbd/keymaps/defkeymap.map.gz > \ - /usr/src/linux-&linux-version;/drivers/char/defkeymap.c</userinput></screen> - -</sect2> - +<!-- The "Configuring your keyboard" section has been moved to +Chapter 7 and renamed to "Configuring Linux console" --> <sect2 id="contents-kbd"><title>Contents of Kbd</title> @@ -163,11 +130,12 @@ ASCII codes of the keys pressed on the keyboard.</para> <indexterm zone="ch-system-kbd unicode_start"><primary sortas="b-unicode_start">unicode_start</primary></indexterm> <para id="unicode_start"><command>unicode_start</command> puts the keyboard and console in -unicode mode.</para> +UNICODE mode. Never use it on LFS, because applications are not +configured to support UNICODE.</para> <indexterm zone="ch-system-kbd unicode_stop"><primary sortas="b-unicode_stop">unicode_stop</primary></indexterm> <para id="unicode_stop"><command>unicode_stop</command> reverts keyboard and console from -unicode mode.</para> +UNICODE mode.</para> </sect2> diff --git a/chapter06/man.xml b/chapter06/man.xml index a1cf37193..58667a2ca 100644 --- a/chapter06/man.xml +++ b/chapter06/man.xml @@ -73,6 +73,35 @@ configuration file in the <filename>/etc</filename> directory.</para></listitem> <filename>man.conf</filename> file and add the <emphasis>-c</emphasis> switch to NROFF.</para></note> +<para>If your character set uses 8-bit characters, search for the line +beginning with "NROFF" in /etc/man.conf, and verify that it coincides +with the following:</para> + +<screen>NROFF /usr/bin/nroff -Tlatin1 -mandoc</screen> + +<para>Note that you should use "latin1" even if it is not the character set +of your locale. The reason is that, +according to the specification, <application>groff</application> has +no means of typesetting characters outside ISO-8859-1 +without some strange escape codes, and localized manual +pages are therefore really a hack. When formatting manual pages, +<application>groff</application> thinks that they are in the ISO-8859-1 +encoding and this <emphasis>-Tlatin1</emphasis> switch tells +<application>groff</application> to use the same encoding for output. +Since <application>groff</application> does no recoding of input characters, +the formatted result is really in the same encoding as input (although +<application>groff</application> doesn't know that it is not ISO-8859-1) +and therefore it is usable as the input for a pager.</para> + +<para>Of course, this hack does not solve the problem of non-working +<command>man2dvi</command> program for localized manual +pages in non-ISO-8859-1 locales. +Also, it does not work at all with multibyte character sets. +The first problem does not have a solution currently. The second +one is not of a concern because the LFS installation does not support +multibyte character sets properly anyway. You may want to look at +internationalization related hints, though.</para> + <para>You may want to also take a look at the BLFS page at <ulink url="&blfs-root;view/cvs/postlfs/compressdoc.html"/> which deals with formatting and compression issues for man pages.</para> diff --git a/chapter06/sysvinit.xml b/chapter06/sysvinit.xml index 48418db53..4494a269a 100644 --- a/chapter06/sysvinit.xml +++ b/chapter06/sysvinit.xml @@ -74,16 +74,26 @@ ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now su:S016:once:/sbin/sulogin -1:2345:respawn:/sbin/agetty tty1 9600 -2:2345:respawn:/sbin/agetty tty2 9600 -3:2345:respawn:/sbin/agetty tty3 9600 -4:2345:respawn:/sbin/agetty tty4 9600 -5:2345:respawn:/sbin/agetty tty5 9600 -6:2345:respawn:/sbin/agetty tty6 9600 +1:2345:respawn:/sbin/agetty -I '\033(K' tty1 9600 +2:2345:respawn:/sbin/agetty -I '\033(K' tty2 9600 +3:2345:respawn:/sbin/agetty -I '\033(K' tty3 9600 +4:2345:respawn:/sbin/agetty -I '\033(K' tty4 9600 +5:2345:respawn:/sbin/agetty -I '\033(K' tty5 9600 +6:2345:respawn:/sbin/agetty -I '\033(K' tty6 9600 # End /etc/inittab <userinput>EOF</userinput></screen> +<para> The -I '\033(K' switch tells agetty to send this escape sequence to +the terminal before doing anything else. This escape sequence switches the +console character set to a user-defined one, which can be modified by +running the <command>setfont</command> program. +Actually, the <command>console</command> initscript from the LFS-Bootscripts +package calls the <command>setfont</command> program during system +startup. Sending this escape sequence is necessary for +people who use non-ISO-8859-1 screen font, but does not hurt native English +speakers.</para> + </sect2> |