Re: How is 8-bit character support enabled for the TTY driver

H. Peter Anvin (hpa@transmeta.com)
7 Dec 1999 14:09:05 -0800


Followup to: <384D6492.4683238A@timpanogas.com>
By author: "Jeff V. Merkey" <jmerkey@timpanogas.com>
In newsgroup: linux.dev.kernel
>
> Whomever owns the TTY drivers, how do you turn the damn thing on to
> allow you to display characters above 127? I am using the ncurses lib
> for building our nwfs utils with a CWorthy look and feel menuing
> interface, along with some management tools, and I cannot get characters
> aove 127 to display. If I use the VCS interface, then I can get it to
> work properly, but VCS screens cannot be accessed from remote terminals
> on other systems. I realize the expanding beyond 7 bits on the terminal
> display may not work on some terminals, but who gives a damn? Linux was
> a PC operating system, so this should be supported, and I only care
> about it working on Linux for the ncurses versions of the tools. There
> is also a text based version of the tools that will work on everything,
> even 7 bit terminal, but we want to put out some fancier tools for folks
> with Linux, DOS, NT, etc.
>

Careful! First of all, there are no guarantees that the entire CP437
font is present (after all, it isn't even on many PCs, and the PC font
lacks a lot of *useful* characters); second, lots of people spend most
of their time in X anyhow.

Anyway, you can use the ncurses interface (recommended), or you can
use the escape sequences from /usr/src/linux/Documentation/unicode.txt
to switch between Latin-1, VT100, IBM Code Page 437, and "everything
else". The last is a huge wart in the console driver IMNSHO; the
obvious solution would be to make it ISO 2022 compliant, but
unfortunately that's impossible to do in a backwards compatible manner
:(

There is also UTF-8 mode, initiated with ESC % G. Then you can issue
Unicode UTF-8 sequences for whatever character you dang well please.

-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."

- 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/