Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
January 19, 2005, 8:45 pm
rate this thread
I'm writing a perl program that needs to draw lines and other special
characters on the screen. I'm using curses to design my user interface.
I'm been trying for a while to figure out how to change to the extended
character set using curses without any success. I'm using FreeBSD 4.10
I'm able to switch to ecs without curses this way
print ("qqqqq"); #works really draw a line
but if I try to print an escape sequence using curses's addstr it will
be printed on screen, so it doesn't work. And it seems that perl's
curses module doesn't support addrawch (which could have been useful)
I also tried what I thought was the solution to my problem but I was
really suprised that it doesn't work :
Curses doesn't seems to switch to ecs
I found this quotes on the newsgroups:
"The attrset(A_ALTCHARSET) will use terminfo capabilties to switch to
the alternate character set. To use this successfully, the terminfo
entry for your terminal must define 'smacs' (start alternate character
set), 'rmacs' (end alternate character set) capabilities. In addition,
the 'sgr' capability definition should implement the '%9' flag for
alternate character set."
is it true? I only found /etc/termcap on my FreeBSD system and nothing
about smacs and rmacs in it.
Anyone can help me ? thanks in advance
Re: switching to extended character set using curses & perl
set. I also tried to modify my /etc/termcap file for each terminals I
use(vt320 & xterm) by adding this in the corresponding sections:
But still curses doesn't switch to alternate character set. Should I do
something special to update the /etc/termcap.db database ? if I use
"tset -S" I see that one of my terminal already have the as,ae,ac,aE
settings configured (vt320), my xterm (from putty) terminal's settings
are not updated when I change /etc/termcap
If someone has another solution than updating the termcap info and
still using curses that would be better since if I distribute the code
I don't want the users to have to mess with termcap.