NCURSES Extended Characters Quick Reference Charts and Screen Layout Chart

By Frank Cox
(September 5, 2010)

May 26, 2013 Update: Added A_ALTCHARSET chart. Modified Extended Characters chart to put in the ACS_URCORNER character.

June 15, 2013 Update: Added Screen Layout Chart


Here are two small quick-reference charts showing the NCURSES extended characters, and a screen layout template for a standard 80x24 terminal.

NCURSES Extended Characters Charts

The NCURSES extended characters graphic shows you the "official" extended characters available through the ACS_ commands included in NCURSES. Extended characters are designed to be portable between terminals, and should generate usable output from anything that you can run NCURSES on.

The NCURSES ALTCHARSET characters chart shows characters generated using the A_ALTCHARSET attribute. A_ALTCHARSET contains all of the extended characters, plus several more such as the euro, yen, cents, copyright, and many more. Note that these characters are less portable between systems than the extended characters, since they depend on what the ALTCHARSET on your terminal happens to be. You should probably use the extended characaters where-ever possible.

These charts show the NCURSES character sets as displayed on a gnome-terminal under Centos 6.

Right-click on the graphics to save a copy for your own use.

The NCURSES extended characters graphic is made from a (very) slightly modified version of the ACS variables example program found here.

Here is the program that generated the table.

#include <ncurses.h>
int main(void)
        {
        initscr();
        attron(A_UNDERLINE);
        mvprintw(0,7,"NCURSES EXTENDED CHARACTERS\n");
        attroff(A_UNDERLINE);
        printw("Upper left corner         "); addch(ACS_ULCORNER); printw("  ACS_ULCORNER\n"); 
        printw("Lower left corner         "); addch(ACS_LLCORNER); printw("  ACS_LLCORNER\n");
        printw("Upper right corner        "); addch(ACS_URCORNER); printw("  ACS_URCORNER\n");
        printw("Lower right corner        "); addch(ACS_LRCORNER); printw("  ACS_LRCORNER\n");
        printw("Tee pointing right        "); addch(ACS_LTEE); printw("  ACS_LTEE\n");
        printw("Tee pointing left         "); addch(ACS_RTEE); printw("  ACS_RTEE\n");
        printw("Tee pointing up           "); addch(ACS_BTEE); printw("  ACS_BTEE\n");
        printw("Tee pointing down         "); addch(ACS_TTEE); printw("  ACS_TTEE\n");
        printw("Horizontal line           "); addch(ACS_HLINE); printw("  ACS_HLINE\n");
        printw("Vertical line             "); addch(ACS_VLINE); printw("  ACS_VLINE\n");
        printw("Large Plus or cross over  "); addch(ACS_PLUS); printw("  ACS_PLUS\n");
        printw("Scan Line 1               "); addch(ACS_S1); printw("  ACS_S1\n");
        printw("Scan Line 3               "); addch(ACS_S3); printw("  ACS_S3\n");
        printw("Scan Line 7               "); addch(ACS_S7); printw("  ACS_S7\n");
        printw("Scan Line 9               "); addch(ACS_S9); printw("  ACS_S9\n");
        printw("Diamond                   "); addch(ACS_DIAMOND); printw("  ACS_DIAMOND\n");
        printw("Checker board (stipple)   "); addch(ACS_CKBOARD); printw("  ACS_CKBOARD\n");
        printw("Degree Symbol             "); addch(ACS_DEGREE); printw("  ACS_DEGREE\n");
        printw("Plus/Minus Symbol         "); addch(ACS_PLMINUS); printw("  ACS_PLMINUS\n");
        printw("Bullet                    "); addch(ACS_BULLET); printw("  ACS_BULLET\n");
        printw("Arrow Pointing Left       "); addch(ACS_LARROW); printw("  ACS_LARROW\n");
        printw("Arrow Pointing Right      "); addch(ACS_RARROW); printw("  ACS_RARROW\n");
        printw("Arrow Pointing Down       "); addch(ACS_DARROW); printw("  ACS_DARROW\n");
        printw("Arrow Pointing Up         "); addch(ACS_UARROW); printw("  ACS_UARROW\n");
        printw("Board of squares          "); addch(ACS_BOARD); printw("  ACS_BOARD\n");
        printw("Lantern Symbol            "); addch(ACS_LANTERN); printw("  ACS_LANTERN\n");
        printw("Solid Square Block        "); addch(ACS_BLOCK); printw("  ACS_BLOCK\n");
        printw("Less/Equal sign           "); addch(ACS_LEQUAL); printw("  ACS_LEQUAL\n");
        printw("Greater/Equal sign        "); addch(ACS_GEQUAL); printw("  ACS_GEQUAL\n");
        printw("Pi                        "); addch(ACS_PI); printw("  ACS_PI\n");
        printw("Not equal                 "); addch(ACS_NEQUAL); printw("  ACS_NEQUAL\n");
        printw("UK pound sign             "); addch(ACS_STERLING); printw("  ACS_STERLING\n\n");
        refresh();
        getch();
        endwin();
        return 0;
        }

Here is the program that generated the A_ALTCHARSET table.

#include <ncurses.h>
int main(void)
        {
        int counter, counter2=0;
        initscr();
        curs_set(0);
        attron(A_UNDERLINE);
        mvprintw(0,24,"NCURSES ALTCHARSET CHARACTERS\n");
        attroff(A_UNDERLINE);
        for (counter=43; counter < 256; counter++)
                {
                printw("%3d = ", counter);
                addch(counter | A_ALTCHARSET);
                if (counter2 < 7)
                        {
                        addch(' ');
                        addch(ACS_VLINE);
                        printw(" ");
                        }
                counter2++;
                if (counter2 > 7)
                        {
                        addch('\n');
                        counter2=0;
                        }
                switch (counter)
                        {
                        case 46:
                                counter=47;
                                break;
                        case 48:
                                counter=95;
                                break;
                        case 97:
                                counter=101;
                                break;
                        case 126:
                                counter=127;
                                break;
                        case 128:
                                counter=160;
                                break;
                        case 172:
                                counter=173;
                        }
                }
        getch();
        endwin();
        return 0;
        }

80x24 Screen Layout Template

Here are two versions of an 80x24 screen layout template. I created this template by making a LibreOffice spreadsheet and then edited a screenshot of the spreadsheet with the Gimp graphic editor program to create a png file. This is a half-size thumbnail of the template image. Click on this image to download both the LibreOffice ods file and the full-size version of the png graphic.



Other lookup tables (html, ASCII, etc.) that I find useful can be found here.


Other articles written by Frank Cox can be found here.

Frank Cox owns and operates the Melville Theatre in Melville, Saskatchewan, Canada, and has been playing with computers for over 30 years.


This work is licensed under a Creative Commons Attribution-Share Alike 2.5 Canada License.