Technical article 104871

Line draw or graphics characters don't display properly on the console

OpenServer 5.0.0

Written · Last revised

Problem

The console screen display is distorted when running an application even though the TERM variable is set to "ansi". Some of the symptoms include escape sequence problems and line draw characters that are not displayed correctly. Applications that have been found to exhibit the problem include:

Progress database applications using protermcap
Informix Online
Word Perfect where, on exiting, the message
"error executing /usr/wp/sbin/386cons"
occurs.

The display works if the application is run under scoterm(XC) (a GUI interface), under a terminal emulator in ANSI mode, or on previous versions of SCO UNIX System V/386, SCO Open Server, or SCO Open Desktop.

Cause

The console display understands 8-bit IBM PC (IBM 437) characters. The internal character set is the 8-bit ISO 8859-1 character set, which is also known as dpANS X3.4.2 and ISO/TC97/SC2. It supports the Latin alphabet and can represent most European languages.

SCO OpenServer Release 5.0.0 sets up the console to correctly
handle the default console codeset and calls mapchan(M) to map the
console codeset to the internal UNIX codeset.  The characters
affected are (mainly) at the high end of the set; namely, those
character whose high bit (the eighth bit) is turned on, which
include bytes previously used to display line draw characters.

By default, SCO OpenServer Release 5.0.0 uses the mapchan(M) file:

/usr/lib/mapchan/ISO8859-1/ibm

This is for use on systems with a standard PC character set ROM (IBM 437). This new default is specified in the /etc/default/mapchan file for the 12 console multiscreens, and is activated at sysinit time through the /etc/bcheckrc file. Previous releases of SCO operating systems did not automatically invoke mapchan(M).

Solution

The solution can be implemented in several ways.  Method 1
is recommended.  These procedures must be run as superuser.

1. Edit the /etc/default/mapchan file, commenting out the console device entries by inserting a "#" sign in column 1 of each line.

BEFORE:
    tty01   ibm
AFTER:
    # tty01   ibm

For the change to take effect, shutdown and reboot the system.

2. Run "mapchan -n" to turn off the console channel processing. This will stay in effect only until the system is rebooted or another mapchan(M) is run on the console channel.

3. Edit the /etc/bcheckrc file, commenting out the "if/then/else/fi"
section that invokes mapchan by inserting a "#" sign in column
one of each of these lines.  This code section should be between
lines 39 to 46.  The resultant lines should appear similar
to this:
# if grep systty=sio /dev/string/boot >/dev/null 2>&1
# then
#    # Serial console.
#    /usr/bin/mapchan -s /dev/tty1a 2>/dev/null
# else
#     /bin/grep -i "^MAPKEY=N" /etc/default/boot >/dev/null 2>&1 || /usr/bin/mapkey </dev/tty01
#     /usr/bin/mapchan -s /dev/tty01 2>/dev/null
# fi

For the change to take effect, shutdown and reboot the system.

If one of these procedures does not correct the problem, try
switching the console driver from ANSI compliance mode to
non-ANSI (old SCO) mode.  This is accomplished by using the
ANSI Escape Sequence "CSI=nL", where n is 4.  Specifically,
this can be done with:
# echo "<ESC>[=4L\c"
where the <Esc> can be entered by preceding the <Esc> key with
a ^V.  To return to ANSI compliance mode, use 5 for n, for
example:
# echo "<ESC>[=5L\c"

See also

The SCO Reference manual or scohelp online man pages: mapchan(M), mapchan(F), screen(HW).

From the Xinuos technical article database, record 104871. Reproduced with permission. The original is at www.sco.com/ta/104871, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.