'\" t .\" Title: ascii .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 04/26/2015 .\" Manual: Development Tools .\" Source: ascii .\" Language: English .\" .TH "ASCII" "1" "04/26/2015" "ascii" "Development Tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" ascii \- report character aliases .SH "SYNOPSIS" .HP \w'\fBascii\fR\ 'u \fBascii\fR [\-dxohv] [\-t] [\fIchar\-alias\fR...] .SH "OPTIONS" .PP Called with no options, \fBascii\fR behaves like `ascii \-h\*(Aq\&. Options are as follows: .PP \-t .RS 4 Script\-friendly mode, emits only ISO/decimal/hex/octal/binary encodings of the character\&. .RE .PP \-s .RS 4 Parse multiple characters\&. Convenient way of parsing strings\&. .RE .PP \-d .RS 4 Ascii table in decimal\&. .RE .PP \-x .RS 4 Ascii table in hex\&. .RE .PP \-o .RS 4 Ascii table in octal\&. .RE .PP \-h, \-? .RS 4 Show summary of options and a simple ASCII table\&. .RE .PP \-v .RS 4 Show version of program\&. .RE .SH "DESCRIPTION" .PP Characters in the ASCII set can have many aliases, depending on context\&. A character\*(Aqs possible names include: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Its bit pattern (binary representation)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Its hex, decimal and octal representations\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Its teletype mnemonic and caret\-notation form (for control chars)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Its backlash\-escape form in C (for some control chars)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Its printed form (for printables)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Its full ISO official name in English\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Its ISO/ECMA code table reference\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Its name as an HTML/SGML entity\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Slang and other names in wide use for it among hackers\&. .RE .PP This utility accepts command\-line strings and tries to interpret them as one of the above\&. When it finds a value, it prints \fIall\fR of the names of the character\&. The constructs in the following list can be used to specify character values\&. If an argument could be interpreted in two or more ways, names for all the different characters it might be are dumped\&. .PP \fIcharacter\fR .RS 4 Any character not described by one of the following conventions represents the character itself\&. .RE .PP \fB^\fR\fIcharacter\fR .RS 4 A caret followed by a character\&. .RE .PP \fB\e\fR\fI[abfnrtv0]\fR .RS 4 A backslash followed by certain special characters (abfnrtv)\&. .RE .PP \fImnemonic\fR .RS 4 An ASCII teletype mnemonic\&. .RE .PP \fIhexadecimal\fR .RS 4 A hexadecimal (hex) sequence consists of one or two case\-insensitive hex digit characters (01234567890abcdef)\&. To ensure hex interpretation use \fIhex\fR\fBh\fR\fI,\fR\fB0x\fR\fIhex,\fR\fBx\fR\fIhex\fR or \fB\ex\fR\fIhex\&.\fR .RE .PP \fIdecimal\fR .RS 4 A decimal sequence consists of one, two or three decimal digit characters (0123456789)\&. To ensure decimal interpretation use \fB\e0d\fR\fIdecimal,\fR\fBd\fR\fIdecimal,\fR or \fB\ed\fR\fIdecimal\&.\fR .RE .PP \fIoctal\fR .RS 4 An octal sequence consists of one, two or three octal digit characters (01234567)\&. To ensure octal interpretation use \fB\e\fR\fI,\fR\fB0o\fR\fI,\fR\fBo\fR\fI,\fR or \fB\eo\fR\fI\&.\fR .RE .PP \fIbit pattern\fR .RS 4 A bit pattern (binary) sequence consists of one to eight binary digit characters (01)\&. To ensure bit interpretation use \fB0b\fR\fI,\fR\fBb\fR\fI\fR or \fB\eb\fR\fI\&.\fR .RE .PP \fIISO\fR/\fIECMA code\fR .RS 4 An ISO/ECMA code sequence consists of one or two decimal digit characters, a slash, and one or two decimal digit characters\&. .RE .PP \fIname\fR .RS 4 An official ASCII or (unofficial) slang name\&. .RE .PP The slang names recognized and printed out are from a rather comprehensive list that first appeared on USENET in early 1990 and has been continuously updated since\&. Mnemonics recognized and printed include the official ASCII set, some official ISO names (where those differ) and a few common\-use alternatives (such as NL for LF)\&. HTML/SGML entity names are also printed when applicable\&. All comparisons are case\-insensitive, and dashes are mapped to spaces\&. Any unrecognized arguments or out of range values are silently ignored\&. Note that the \fB\-s\fR option will not recognize \*(Aqlong\*(Aq names, as it cannot differentiate them from other parts of the string\&. .PP For correct results, be careful to stringize or quote shell metacharacters in arguments (especially backslash)\&. .PP This utility is particularly handy for interpreting cc(1)\*(Aqs ugly octal `invalid\-character\*(Aq messages, or when coding anything to do with serial communications\&. As a side effect it serves as a handy base\-converter for random 8\-bit values\&. .SH "AUTHOR" .PP Eric S\&. Raymond ; November 1990 (home page at \m[blue]\fBhttp://www\&.catb\&.org/~esr/\fR\m[])\&. Reproduce, use, and modify as you like as long as you don\*(Aqt remove this authorship notice\&. Ioannis E\&. Tambouras added command options and minor enhancements\&. Brian J\&. Ginsbach fixed several bugs and expanded the man page\&. David N\&. Welton added the \fB\-s\fR option\&. Matej Vela corrected the ISO names\&. Dave Capella contributed the idea of listing HTML/SGML entities\&.