Re: Console character sets

From: Bob Rasmussen (ras_at_anzio.com)
Date: 08/10/05


Date: Tue, 9 Aug 2005 19:09:18 -0700 (PDT)
To: santo71@gmail.com

On Tue, 9 Aug 2005 santo71@gmail.com wrote:

> I'm having a very similar situation. My legacy app sends a sequence of
> hex values to the console to draw rudimentary boxes and charts. These
> characters are not working at all on the OSR6 console.
>
> The hex characters are 0xda, 0xd9, 0xbf, 0xc0, 0xb3, 0xc4 (essentially
> the corners and sides of a box).
>
> I've tried every possible font in /usr/lib/vidi and mapchan and none of
> them work properly so I'm stuck and would really appreciate some help
> on getting this app to display properly on OSR6

If your app is hard-coded to those values, "bad form", and you're in for a
bit of work, I think. Here's what I know about OSR6 character mode
console:

1) It comes up as an at386-ie terminal type.

2) It comes up with a mapchan in place for IBM437, which is WRONG. Null
out the mapchan (in each session).

3) the console session(s) will now operate as at386-ie. Presumably, the
"ie" is for "international edition".

4) You can see this charset by catting out a character chart. If you don't
have one, find one at
   http://www.anzio.com/~ras/ascii80.txt
You will see that this chart has many international and accented
characters in the range of A0 to FF. In fact this is the ISO-8859-1 set,
which is identical to Windows codepage1252 except that the latter has
characters assigned to hex-80 through hex-9F. By contrast, the at386-ie
chart has the linedraw characters in this area (there they are!).

5) You may be able to create a mapchan file to translate your expected
charset (437) to the at386-ie set, but I don't think you'll find one ready
to go.

6) to make your app more device-independent, if you have access to the
source, you could output the 'smacs' sequence from the terminfo (or
equivalent from termcap), then issue the appropriate ascii characters for
the graphics characters you want, then issue the rmacs sequence.

7. Note that there may be other subtle differences between the behavior of
the OSR6 console and the 5.0.x console. Pay particular attention to the
interaction between color attributes and monochrome attributes such as
bold, reverse, and normal.

8) Finally, note that your legacy app may in fact be more
device-independent, and all you need to do is change your TERM variable.

Regards,
....Bob Rasmussen, President, Rasmussen Software, Inc.

personal e-mail: ras@anzio.com
 company e-mail: rsi@anzio.com
          voice: (US) 503-624-0360 (9:00-6:00 Pacific Time)
            fax: (US) 503-624-0760
            web: http://www.anzio.com



Relevant Pages

  • Re: [PATCH TO TEST] VESA [1024x768] mode support for FreeBSD-CURRENT
    ... Michal Mertl wrote: ... >>I feel like I am missing a lot here. ... I want to display 132 characters per ... > who didn't have text mode console covering all LCD surface. ...
    (freebsd-questions)
  • Re: Unicode-based FreeBSD
    ... This is clearly an area where FreeBSD is lacking. ... Does Linux really display and render all Chinese ... of characters, there are also such things as precomposed-decomposed ... Non-X console in graphical mode. ...
    (freebsd-current)
  • Re: Win32 API call ReadConsoleOutput
    ... Could it be that the console is only 132 x 300? ... how much you can read regardless of the size of the buffer you supply. ... > whose columns x rows product exceeds about 13,300 characters. ... > times the threshold where ReadConsoleOutput fails. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Kernel utf-8 handling
    ... console*, not for X, that handles utf8? ... the console will work (don't know about a console terminal ... all the dead latin1 accents working on my uk keymap. ... I only use compose keys for a bunch of characters like © ...
    (Linux-Kernel)
  • Re: SendKey problem with doubleused keys
    ... and cause you keystrokes to go somewhere other than ... THE TARGET APP CAN ACCEPT THEM. ... you can get missed characters ... when a long string is sent I found that often one of the backslash characters is changed to its correspondent 'non Alt Gr' character. ...
    (microsoft.public.vb.winapi)

Loading