/* Program nrc.c. Use with a DEC VT320 International Model terminal or emulator, such as MS-DOS Kermit, to display 7-bit, 94-character "National Replacement Character" sets (NRCs). These are similar to, but not always the same as, ISO 646 national character sets. In particular, the designating sequences might differ, some characters might differ, and some NRCs are found in DEC terminals that have no ISO 646 equivalent at all (e.g. Swiss). Usage: Just run it. It sends a character set table to stdout. Check the appearance of the table against the DEC terminal manuals, ISO 646 standards, etc. Compile with -DOTHERS if you also want to check DEC special, supplemental, and technical sets. Only the ISO 646 special characters are shown, so this is useful only for checking the designating sequence, rather than the contents of these character sets. Author: F. da Cruz, Columbia University, Jan 1993 */ char * s = " # @ [ \\ ] ^ _ ` { | } ~"; struct cset { char *name; char *designator; } x[] = { " ASCII", "(B", /* ISO 646 and DEC */ #ifdef OTHERS " Alt ROM", "(1", /* DEC only */ #endif /* OTHERS */ " British", "(A", /* ISO 646 and DEC */ "Cuban", "(!@", /* ISO only */ " Dutch", "(4", /* ISO 646 and DEC */ " Finnish", "(C", /* ISO 646 and DEC */ " Finnish", "(5", /* Alternate form, DEC only */ " Fr-Canadian", "(9", /* DEC only */ " Fr-Canadian", "(Q", /* Alternate form, DEC only */ " French", "(f", /* ISO 646 only */ " French", "(R", /* DEC only */ " German", "(K", /* ISO 646 and DEC */ " Hungarian", "(i", /* ISO 646 only */ " Italian", "(Y", /* ISO 646 and DEC */ #ifdef COMMENT /* No standard, no DEC NRC, obsolete */ " Icelandic", "(?", /* Designating sequence unknown. */ #endif /* COMMENT */ " Japanese Roman", "(J", /* ISO 646 */ " Norway", "(`", /* ISO 646 and DEC */ " Norway/Denmark", "(E", /* ISO 646 and DEC */ " Norway/Denmark", "(6", /* Alternate form, DEC only */ " Portuguese", "(g", /* ISO 646 1984 (126=tilde) */ " Portuguese", "(L", /* ISO 646 1976 (126=degree) */ "Portuguese", "(%6", /* Alternate form, DEC only */ " Serb/Slovenian", "(z", /* ISO */ " Spanish", "(Z", /* ISO 646 1976 and DEC */ #ifdef COMMENT /* This one is completely different from the 1976 version */ " Spanish", "(h", /* ISO 646 1984 */ #endif /* COMMENT */ #ifdef OTHERS " Special Graphics", "(0", /* DEC only */ " Special Graphics", "(2", /* Alternate form, DEC only */ "Suppl Graphics", "(%5", /* DEC only */ #endif /* OTHERS */ " Swedish/programs", "(G", /* ISO 646 only */ " Swedish/names", "(H", /* ISO 646 and DEC */ " Swedish/names", "(7", /* DEC only */ " Swiss", "(=" /* DEC only */ #ifdef OTHERS ," Technical", "(>" /* DEC only */ #endif /* OTHERS */ }; int n = (sizeof(x) / sizeof(struct cset)); main() { int i; printf( "35 64 91 92 93 94 95 96 123 124 125 126 Designator Name\n"); printf("%c[42h",'\33'); /* Enable NRCs */ for (i = 0; i < n; i++) { /* Print special chars from each set */ printf("%c%s%s %c%s \"ESC %s\" %s\n", '\33', /* Escape */ x[i].designator, /* Switch to set i */ s, /* Print special chars */ '\33', /* Escape */ x[0].designator, /* Back to ASCII for legend */ x[i].designator, /* Show designator */ x[i].name); /* Print name */ } }