Line graphics on Linux console
Frank Millman
frank at chagford.com
Tue Feb 1 02:31:16 EST 2005
Frank Millman wrote:
> Hi all
>
> The following is a message I sent to co.os.linux.setup -
>
> "My question concerns line graphics on a text-based console. My
> actual problem relates to a [Python] program I have written using
> ncurses, but you can easily test it by running a program like
> minicom.
>
> If you call up the minicom menu, it should be surrounded by a nice
> box made up of horizontal and vertical lines, corners, etc. It used
to
> work up until Redhat 7. Since upgrading to Redhat 9, and now
Fedora,
> it (and my program) has stopped working."
>
> I received the following reply from Thomas Dickey -
>
> "That's because Redhat uses UTF-8 locales, and the Linux console
> ignores vt100 line-drawing when it is set for UTF-8. (screen also
> does this)."
For the record, I have found a solution, or at least a workaround.
I received the following suggestion from Steve (thanks Steve) -
"As a quick check to see if it's only the UTF-8 locales that are
affecting your program, try invoking your program, like so:
$ LANG=C <your-proggy>"
I tried this, but it did not work. However, it felt as if it ought to,
so I sent another message to Thomas Dickey (who, I have discovered, is
the maintainer of the ncurses library).
He replied that the console is probably still in unicode mode, but you
can turn it off with 'unicode_stop'.
I tried this and it worked :-) - I did not even have to change the LANG
or TERM settings.
Obviously this will not work if you need unicode, but luckily for me I
do not, so it is a perfect workaround.
Frank Millman
More information about the Python-list
mailing list