"Sheshadrivasan B" wrote on 2005-03-16 12:38 UTC:
> what I actually meant was the Linux serial console (/dev/ttySxx) device not 
> the VGA console.

As far as the kernel is concerned, there is no difference between the
serial console and the way xterm interacts with the kernel (via a pseudo
terminal). The tty-driver cooked-mode issue applies to all of these.
Other than that, the level of UTF-8 support is entirely up to the
terminal (emulator) that you connect to your serial port.

> When a terminal emulator is connected to the serial console how does the 
> character generation
> take place:
>    a) Keyboard combination pressed by user generates the unique Unicode code 
> point for a particular character, which is received by the serial driver 
> which 
> is encoded into UTF-8

The serial driver just passes on bytes. It is ignorant on what character set is
used. If you want to use UTF-8, then this both your terminal emulator
and your application need to be told that UTF-8 will be used. For most Linux
applications, this happens via the locale variables (LANG=en_GB.UTF-8, etc.).

>    b) The terminal emulator generates the UTF-8 sequence corresponding to 
> the character pressed by the user ?

Correct.

> Also, do we have keyboards that are specific to locales?

Yes. Each commonly used keyboard layout was originally designed for one
particular country or language group.

> do all keyboards permit input of US-ASCII characters.

All standard keyboards used on PCs have always been able to enter the full
ASCII repertoire. It would be close to impossible to use Linux from a keyboard
that does not allow you to enter all ASCII characters. (Which is the reason
why ANSI C trigraphs were ridiculed so much.)

> Or is it that the key-combinations are mapped to a Unicode code point by the 
> terminal emulator which get sent to the serial console ?

There is no other commonly used way to transfer Unicode character over a
VT100-style terminal serial communication than in the form of UTF-8.

Markus

-- 
Markus Kuhn, Computer Lab, Univ of Cambridge, GB
http://www.cl.cam.ac.uk/~mgk25/ | __oo_O..O_oo__


--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to