The problem: The keyboard still sends plain 8 bit codes even when VC_UNICODE
is set. The console expects to see UTF-8 in unicode mode though, so after
echo -ne '\e%G' ; kbd_mode -u
the german umlauts (with codes >= 0x80) don't appear anymore. In the function
drivers/char/console.c:do_con_write, "Incomplete characters silently ignored",
which is the reason why (the console's behaviour is OK I think, even though it
could output the replacement character in these cases).
OTOH if you enter these characters using Alt-keypad, this works, because the
piece of code responsible for this (in function do_shift) respects the
VC_UNICODE setting.
This is the patch to the function do_self: (for v2.1.127):
(Note: this is the first patch I post here, so if something's not OK, please
tell me!)
--- linux/drivers/char/keyboard.c.orig Thu Nov 12 23:25:54 1998
+++ linux/drivers/char/keyboard.c Tue Nov 10 22:30:52 1998
@@ -535,7 +535,10 @@
return;
}
- put_queue(value);
+ if (kbd->kbdmode == VC_UNICODE)
+ to_utf8(value);
+ else
+ put_queue(value);
}
#define A_GRAVE '`'
I realize that if the translation tables contain values < 0xf000, they are
sent using the UCS2 encoding (always...), even though I haven't found out how
to set them so with loadkeys.
(This is on an i586 PC with german keyboard layout loaded)
Feedback?
HTH,
Wolfgang Oertl
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/