Gerard Beekmans wrote:
cp: cannot stat
`/home/httpd/www.linuxfromscratch.org/patches/downloads/linux/linux-2.6.17.13-utf8_input-1.patch':
No such file or directory
No distro implements what we have in LFS-6.2. Also, the text on the
kernel page is now slightly wrong because, unlike previous versions,
linux-2.6.17 does attempt to avoid producing invalid UTF-8 sequences
(this doesn't mean "always produces correct characters"). So let's stay
with what upstream has tested, and apply the following patch to the book
(it does introduce regressions in functionality, but we are still not
worse than anyone else).
--
Alexander E. Patrakov
Index: BOOK/chapter03/patches.xml
===================================================================
--- BOOK/chapter03/patches.xml (revision 7787)
+++ BOOK/chapter03/patches.xml (working copy)
@@ -187,14 +187,6 @@
</varlistentry>
<varlistentry>
- <term>Linux kernel UTF-8 Composing Patch - <token>&linux-utf8-patch-size;</token>:</term>
- <listitem>
- <para>Download: <ulink url="&patches-root;&linux-utf8-patch;"/></para>
- <para>MD5 sum: <literal>&linux-utf8-patch-md5;</literal></para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term>Linux Libc Headers Inotify Patch - <token>&linux-inotify-patch-size;</token>:</term>
<listitem>
<para>Download: <ulink url="&patches-root;&linux-inotify-patch;"/></para>
Index: BOOK/chapter07/console.xml
===================================================================
--- BOOK/chapter07/console.xml (revision 7787)
+++ BOOK/chapter07/console.xml (working copy)
@@ -92,31 +92,13 @@
<para>For many keyboard layouts, there is no stock Unicode keymap in
the Kbd package. The <command>console</command> bootscript will
convert an available keymap to UTF-8 on the fly if this variable is
- set to the encoding of the available non-UTF-8 keymap. Note, however,
- that dead keys (i.e., keys that don't produce a character by
- themselves, but put an accent onto a character procuced by the next
- key; there are no dead keys on the standard US keyboard) and composing
- (i.e., pressing Ctrl+. A E in order to produce the Æ character)
- will not work in UTF-8 mode without the special kernel patch.
+ set to the encoding of the available non-UTF-8 keymap.
This variable is useful only in UTF-8 mode.</para>
</listitem>
</varlistentry>
- <varlistentry>
- <term>BROKEN_COMPOSE</term>
- <listitem>
- <para>Set this to <quote>0</quote> if you are going to apply the kernel patch in
- Chapter 8. Note that you also have to add the character set expected
- by composition rules in your keymap to the FONT variable after the
- <quote>-m</quote> switch. This variable is useful only in UTF-8 mode.</para>
- </listitem>
- </varlistentry>
-
</variablelist>
- <para>Support for compiling the keymap directly into the kernel has been
- removed because there were reports that it leads to incorrect results.</para>
-
<para>Some examples:</para>
<itemizedlist>
@@ -152,8 +134,8 @@
</listitem>
<listitem>
- <para>The following is a Unicode-enabled example for Bulgarian, where a stock
- UTF-8 keymap exists and defines no dead keys or composition rules:</para>
+ <para>The following is a Unicode-enabled example for Bulgarian, where a
+ stock UTF-8 keymap exists:</para>
<screen role="nodump"><userinput>cat > /etc/sysconfig/console << "EOF"
<literal># Begin /etc/sysconfig/console
@@ -186,26 +168,40 @@
</listitem>
<listitem>
- <para>The following example illustrates keymap autoconversion from
- ISO-8859-15 to UTF-8 and enabling dead keys in Unicode mode:</para>
+ <para>There is no pre-made UTF-8 Russian keymap, therefore, it has to be
+ produced by converting the existing KOI8-R keymap, as illustrated
+ below:</para>
<screen role="nodump"><userinput>cat > /etc/sysconfig/console << "EOF"
<literal># Begin /etc/sysconfig/console
UNICODE="1"
-KEYMAP="de-latin1"
-KEYMAP_CORRECTIONS="euro2"
-LEGACY_CHARSET="iso-8859-15"
-BROKEN_COMPOSE="0"
-FONT="LatArCyrHeb-16 -m 8859-15"
+KEYMAP="ru_ms"
+LEGACY_CHARSET="koi8-r"
+FONT="LatArCyrHeb-16"
# End /etc/sysconfig/console</literal>
EOF</userinput></screen>
</listitem>
<listitem>
+ <para>Some keymaps have dead keys (i.e., keys that don't produce a
+ character by themselves, but put an accent on the character produced
+ by the next key) or define composition rules (such as: <quote>press
+ Ctrl+. A E to get Æ</quote> in the default keymap).
+ Linux-&linux-version; in UTF-8 keyboard mode assumes that accented
+ characters produced via dead keys or composing are in the Latin-1 range
+ of Unicode, and it is impossible to change this assumption. Thus,
+ accented characters needed for, e.g., the Czech language, can't be typed
+ on Linux console in UTF-8 mode (but files containing these characters can
+ be displayed correctly). The solution is either to avoid the use of
+ UTF-8, or to install the X window system that doesn't have this
+ limitation in its input handling.</para>
+ </listitem>
+
+ <listitem>
<para>For Chinese, Japanese, Korean and some other languages, the Linux
- console cannot be configured to display the needed characters. Users
+ console cannot be configured even to display the needed characters. Users
who need such languages should install the X Window System, fonts that
cover the necessary character ranges, and the proper input method (e.g.,
SCIM, it supports a wide variety of languages).</para>
@@ -219,7 +215,8 @@
<para>The <filename>/etc/sysconfig/console</filename> file only controls the
Linux text console localization. It has nothing to do with setting the proper
keyboard layout and terminal fonts in the X Window System, with ssh sessions
- or with a serial console.</para>
+ or with a serial console. In such situations, limitations mentioned in the
+ last two list items above don't apply either.</para>
</note>
</sect1>
Index: BOOK/chapter08/kernel.xml
===================================================================
--- BOOK/chapter08/kernel.xml (revision 7787)
+++ BOOK/chapter08/kernel.xml (working copy)
@@ -39,13 +39,6 @@
in the kernel source tree for alternative methods to the way this book
configures the kernel.</para>
- <para>By default, the Linux kernel generates wrong sequences of bytes when
- dead keys are used in UTF-8 keyboard mode. Also, one cannot copy and paste
- non-ASCII characters when UTF-8 mode is active. Fix these issues with the
- patch:</para>
-
-<screen><userinput>patch -Np1 -i ../&linux-utf8-patch;</userinput></screen>
-
<para>Prepare for compilation by running the following command:</para>
<screen><userinput>make mrproper</userinput></screen>
Index: BOOK/patches.ent
===================================================================
--- BOOK/patches.ent (revision 7787)
+++ BOOK/patches.ent (working copy)
@@ -99,11 +99,6 @@
<!ENTITY kbd-gcc4_fixes-patch-size "1.4 KB">
-<!ENTITY linux-utf8-patch "linux-&linux-version;-utf8_input-1.patch">
-<!ENTITY linux-utf8-patch-md5 "af8bddc93d6b368aa4c8ecdff2d3ab76">
-<!ENTITY linux-utf8-patch-size "11 KB">
-
-
<!ENTITY linux-inotify-patch "linux-libc-headers-&linux-libc-headers-version;-inotify-3.patch">
<!ENTITY linux-inotify-patch-md5 "8fd71a4bd3344380bd16caf2c430fa9b">
<!ENTITY linux-inotify-patch-size "4.7 KB">
Index: bootscripts/lfs/init.d/console
===================================================================
--- bootscripts/lfs/init.d/console (revision 7787)
+++ bootscripts/lfs/init.d/console (working copy)
@@ -72,18 +72,6 @@
[ -z "${KEYMAP_CORRECTIONS}" ] ||
loadkeys ${KEYMAP_CORRECTIONS} &>/dev/null
- # Linux kernel generates wrong bytes when composing
- # in Unicode mode. That's why we disable dead keys in Unicode
- # mode by default. If you need them, download and apply
- # http://www.linuxfromscratch.org/~alexander/patches/linux-2.6.12.5-utf8_input-2.patch
- # After patching, add "-m charset_of_your_keymap" to the FONT
- # variable and set BROKEN_COMPOSE=false
- # in /etc/sysconfig/console
-
- [ -n "$BROKEN_COMPOSE" ] || BROKEN_COMPOSE="$UNICODE"
- ! is_true "$BROKEN_COMPOSE" ||
- echo "" | loadkeys -c &>/dev/null
-
# Convert the keymap from $LEGACY_CHARSET to UTF-8
[ -z "$LEGACY_CHARSET" ] ||
dumpkeys -c "$LEGACY_CHARSET" | loadkeys -u &>/dev/null
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page