Re: Default character set of the Linux console

Qrczak (qrczak@knm.org.pl)
Mon, 29 Dec 1997 16:37:04 +0100 (MET)


On 29 Dec 1997, Boris Tobotras wrote:

> This problem is ubiquitous in Russia. It is annoying, but is completely
> solved from user space. Just add ESC(K to termcap and terminfo init
> sequences for "linux" terminal. This way, every program initializing
> terminal will automagically reset user mapping.

#define terminfo terminfo and termcap

Yes, I use this method now. But I treat this as a temporary solution until
terminfos distributed with new Linuxes are changed this way. Now the
situation is not clear and some programs could reset the terminal with
terminfo sequence assuming that it will reset the map (officially it still
should reset the map, yes?), and other may use direct ESCc although it
would be better to leave the custom map active. Maybe there are very few
cases where this can cause problems, but for me this needs some
clarification. It seems to work now, at least for programs using terminfo
(logout resets the map even after fixing terminfo). I would be happy
enough if it becomes the "official" way for doing this - if I could say
that the assumption that resetting with terminfo rs1 sequence will reset
the map is obsolete, and if good programs _had to_ use terminfo instead of
direct ESCc (this is probably true now).

Probably one source of these problems is that many console settings are
write-only. Programs can't simply check them, set their own values, use
them and restore the previous state at the end. If programs only _could_
restore various settings, maybe resetting the terminal would be less
important - now there is greater chance that a program would leave bad
settings, because it can't read the old ones. There is even no simply
check if console is in Unicode mode, and programs in console-tools package
do this by outputting three bytes and checking how much the cursor had
moved! This is obvious that knowing the state of Unicode mode is often
important. Maybe future terminals should allow reading of some settings?

-- 
                                 QRCZAK      #
    __("<              Marcin Kowalczyk     #*#
    \__/              qrczak@knm.org.pl    #\#&#
     ^^      http://qrczak.home.ml.org/      I