0

I'd like to upgrade the output from my embedded C projects that sends debug information over the serial port using extended characters, like frame edges and corners (like from here ). I'm on OSX and using screen. I have found a library that implements the basic ANSI escape codes like change foreground/background color, bold, italic, etc.

Question is - does screen on OSX support some way of interpreting extended ASCII/ANSI codes so that I can get access to these fancy character sets (Maybe even emoji? :-)?

I have been playing around with adding more escape sequences to access extended character set, but nothing seems to be working.

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
David
  • 21
  • 5

1 Answers1

1

The referenced Ansiterm has no functions which use the VT100 line-drawing characters. It is a special, hard-coded case.

The question about "screen on OSX" could be taken in two ways:

  • GNU screen running in a terminal window (usually Terminal or Iterm2), or
  • just the Terminal program.

Any of those support VT100 line-drawing. They emulate (imitate) xterm, which in turn emulates (and extends) VT100, VT220, VT420. Those are similar but different. Most applications use a library such as ncurses to use different terminals effectively.

Emoji is a special case of Unicode; some people say Terminal.app does this (using UTF-8):

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
  • Thanks for this info, I was having a hard time understanding how all of these things fit together and emulate each other. – David Oct 14 '15 at 16:46
  • To clarify the question, I'm using GNU screen to talk to a serial port connected to an embedded project, and I want to know how fancy I can make the output from my embedded project. This whole thing started when I realized that i could use escape sequences to control the terminal's cursor position and make "control-panel" style debug output from my sensors instead of the usual scrolling println() statements. – David Oct 14 '15 at 16:54
  • I have been [reading the vt100 terminal](http://www.vt100.net/docs/vt102-ug/chapter5.html) and see the parts about the different character sets G0, G1, and G2, but I am not sure how the currently used set is specified. So for example if I wanted to draw a corner (character 107) I would send ^(1 to load the special character set into G0 and then write 107 to the port? Or do I need to send another escape sequence to select G0? Thanks :-) – David Oct 14 '15 at 17:01
  • Well - it wouldn't be exactly that sequence (in the link, the description *follows* the sequence: you would use `ESC ( 0`). That loads the character set. Then you use one of the *shift* sequences (shift in, shift out, single shift, locking shift) to determine which character sets are used. – Thomas Dickey Oct 15 '15 at 00:02