S
someone92
Hi,
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
(VT320 terminal)
I'm able to switch to ecs without curses this way
print ("\e(0");
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::initscr;
Curses::attrset(A_ALTCHARSET);
$c="qqqqqqqqqqq";
Curses::addstr ($c);
Curses::refresh;
Curses::endwin;
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
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
(VT320 terminal)
I'm able to switch to ecs without curses this way
print ("\e(0");
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::initscr;
Curses::attrset(A_ALTCHARSET);
$c="qqqqqqqqqqq";
Curses::addstr ($c);
Curses::refresh;
Curses::endwin;
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