Re: Default character set of the Linux console

Tuomas Heino (tbittih@xgw.fi)
Fri, 26 Dec 1997 19:23:20 +0200 (EET)


On Fri, 26 Dec 1997, Qrczak wrote:

> Hello!
>
> As you know, the default character set of the standard Linux text mode
> console is ISO-8859-1. One can switch to some other charset by loading a
> font together with its Screen Font Map (SFM), loading an
> Application-Charset Map (ACM) and activating it by emitting `^[(K' to the
> console.
>
> But many people want something other than ISO-8859-1. The font, SFM and
> ACM survive almost everything - they remain the same until loading the new
> ones. The only problem is that to make the custom ACM active, somebody has
> to output `^[(K'. Resetting the terminal with ^[c or logging out brings
> ISO-8859-1 back. And there is no good place for the `^[(K'!
>
There _is_ a way to force a "default" mapping from userspace - haven't yet
tracked down how to do that though... ("default" as in only_one_in_use?)
You could try fooling with svgatextmode/setfont/alike ;)
[snip]
>
> The only problem I could see is that it would break the old and documented
> rules, which say that resetting the console changes the charset back to
> ISO-8859-1. It's not simply a bugfix - it's a change of some rules. But
> any other sensible solution, i.e. hacking terminfo, breaks these rules as
> well - only on a different level. So I think it is not a real problem.
>
[snip]
>
> If there is a better way for doing that, please let me know.
>
> Please reply also directly to me, as I'm not subscribed to linux-kernel.
>
> Thank you in advance for considering this change.
>
Please DON'T default reset escape stuff to user editable maps...
resetting the console properly is hard enough even without that...

[imnsho the current state of the console driver is a bit broken as it
doesn't really do proper "hardware abstraction" ...]

FYI the current 2.1.xx vga.c has something like this:
/*
* The default font is kept in slot 0 and is never touched.
* A custom font is loaded in slot 2 (256 ch) or 2:3 (512 ch)
*/

if (set)
{
video_font_is_default = !arg;
font_select = arg ? (ch512 ? 0x0e : 0x0a) : 0x00;
}

if ( !video_font_is_default )
charmap += 4*cmapsz;

Hmm how to call "set_get_font(char * arg, int set, int ch512)" from
userspace with null arg? (setfont doesn't do that...)

/* damn time's up - gotta go 'fore finishing up this message - well it's got the point - that's 'nuff ;) */
/* let's repeat the point: this's the wrong way(tm) */

Write failed: Network is unreachable