Reputation: 730
I am currently working on a server program that serves text terminals. It's intended target client is xterm. I am trying to "draw lines" around a rectangular section, similar to window frames in old TUI mode programs. There are of course the ASCII characters > 127 which define those line drawing characters, but through a telnet connection only 7 bit are relevant and all characters > 127 turn out to be a default block on the client screen. I know about the VT100 control sequences which set other graphic sets like G0, G1 etc and how to activate them via ESC)x and ESC(x as well as the the single character codes SI and SO. The problem is, none of these seem to have the desired effect.
My best success was so far to send out
ESC, ')', '0', SO
When I send data afterwards, I still get normal characters. However once I terminate the connection and the xterm program (I use MobaXTerm) prints it's deconnect message, that message now appears in the selected graphic character set.
What would be the best way to switch the terminal to the graphic mode and then draw the respective graphic characters?
Upvotes: 0
Views: 1902
Reputation: 54563
Perhaps you cannot: as I recall MobyXterm is based on PuTTY, whose developers decided not to support VT100 line-drawing when doing UTF-8 encoding. The ncurses library has a workaround for this breakage when the environment variable NCURSES_NO_UTF8_ACS is set -- but that would not help with direct writes of escape sequences that you are doing.
Upvotes: 1