Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VC_UNICODE and keyboard input

0 views
Skip to first unread message

Wolfgang Oertl

unread,
Nov 10, 1998, 3:00:00 AM11/10/98
to
The problem: keyboard and console are in Unicode mode, using

echo -ne '\e%G' ; kbd_mode -u

Now the german umlauts (with codes >= 0x80) don't appear anymore. The reason
is that while the console now expects UCS2, the keyboard still emits
single-byte Latin-1 codes, which are invalid in UCS2, so nothing is displayed.

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.

The critical code is in drivers/char/keyboard.c, function "do_self". The last
line

put_queue(value);

should probably read (copied from the numberpad handling routine in do_shift):

if (kbd->kbdmode == VC_UNICODE)
to_utf8(value);
else
put_queue(value);

(data type of "value" is unsigned char)
I've actually tried that patch with 2.1.127, and it works as expected.

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)

I don't want to send a patch because the ``bug'' is so obvious (to me ;-) that
the current behaviour could actually be the correct one.

Any opinions?


My earlier post about the elevator algorithm: I have to admit that I didn't
grok the algorithm, and that of course it works just fine... Thanks to Ben
Kosse and Stephen Tweedie for telling me that w/o flames!

HTH,
Wolfgang Oertl


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

0 new messages