Am Dienstag, den 17.08.2010, 11:53 -0600 schrieb Matthew Burgess: > Hi all, > > The only remaining ticket for LFS-6.7 is 2722, although I'm not sure > quite what needs to be done to resolve it. That ticket points to the > kernel's unicode.txt document to show that the linux console is > always uses unicode, but also quotes setfont(8): > > "If the console is in utf8 mode (see unicode_start(1))" > > Why the "If" there? Has setfont(8) just not been updated since the > kernel changed, or is it because kbd is not Linux specific? Or have I > just misunderstood the docs? > > If the console is always in unicode, why do our bootscripts call > `kbd_mode -u` to set the console mode? > > I think I understand the proposed changes to the examples, but I'd > prefer it if someone could prepare a patch in case I screw them up > (given my last few commits, that's entirely possible!). And if that > patch also contains the changes to the descriptive text too, that > may make it easier for me to understand what's going on. > > Thanks, > > Matt. >
Here is my understanding of that: If we're NOT in unicode mode (this is the default) the kernel assumes that the applications are using "legacy charsets" (for example 8859-15) for their output. But now, there's a problem: This output needs to be converted into unicode values (because most fonts are using unicode for the mapping). This translation table can be set with the -m option of setfont. After this translation, the correct character can be displayed on the screen. If the application expects input from the keyboard, it will always receive the lower 8 bits from the keymap. I know, that's a bit confusing (because the application actually won't receive 8859-15 values, if the keymap is loaded with unicode). If we're in unicode mode, the kernel assumes that the applications are producing UTF8 encoded output. So there's no need to translate something. The keymap is normally loaded with unicode values by kdb (see http://gunnarwrobel.de/wiki/Linux-and-the-keyboard.html). That's why I said "the linux console always uses unicode". I think it can be loaded with "legacy charsets" (but only legacy keymaps without a chaset definition will do that). I hope that I understood all these things in the right way. I would suggest the following for the book (I'm sure that it can be written in a better way): If programs without UTF-8 support should be used, the kernel needs a table to translate the output of the program into unicode. This translation table can be set with -m parameter. It should be set to the same charset, that is used by the application. If all applications are supporting UTF-8, the console can be set into unicode mode (UNICODE="1"). In this case, there is no need to specifiy a translation table. I don't know a meaningful example for LEGACY_CHARSET, because all keymaps I've seen are using unicode or the are defining the correct charset. Same for KEYMAP_CORRECTIONS. I don't know a meaningful example. -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page