4.5 KiB
ASCII Character Reference
This document attempts to categorize and give reference for all ASCII codes and their various representations. I primarily used this PDF and this website as references.
How to Use This Document
How to Render It
The document is written in AsciiDoc (and rendered with AsciiDoctor). The most up-to-date AsciiDoc code can be found at my OpTools repo. You may see some things that don’t quite match the AsciiDoc spec in the source; that’s because they’re probably AsciiDoctor-specific extensions.
You can render it via asciidoctor -n ascii.adoc
. By default it will render HTML5.
You can also render to PDF via asciidoctor-pdf -n ascii.adoc
.
How to Read It
Each section under Reference Tables has information about the following tables. Each table thereafter has the following columns in order:
- DEC
-
The decimal representation of the character (i.e. what would be returned in Python’s
ord()
). - OCT
-
The octal representation of the character.
- HEX
-
The hexadecimal representation of the character.
- BIN
-
The binary representation of the character.
- HTML
-
The HTML number representation of the character.
- ESCAPE
-
The HTML escape of the character (if it has one), e.g.
"
. (Does not include the full set of HTML5 characters, only characters that should be escaped.) - LIT
-
The literal character (if it is unprintable, its symbol name will be given instead in italics).
- DESC
-
A description of the character.
If any fields are not relevant, possible, defined, printable, etc. then they will be "N/A" (without the quotes).
Reference Tables
ASCII ("American Standard Code for Information Interchange") is a series of 7-bit sequences in which each single bit represents a character.
The tables given provide the information in 8 bits (256 characters total) per
ISO 8859-1, commonly referred to
as the Latin-1
or latin1
character set, in order to uniformly include the
extended ASCII set.
You may see some characters link to a Wikipedia article in their description. This is typically done because the symbol/character is known by multiple different names or they’re uncommon.
You can, of course, copy the character directly from this page into your clipboard (if your OS supports it).
ASCII Control Characters
(DEC 0-31, OCT 000-037, HEX 00-1f)
These characters represent control codes — characters that alter the environment. They’re primarily used these days for *nix (UNIX, BSD, GNU/Linux) terminals. Historically they have been used for things like line printers.
You may see things in fixed-width
in the description; these are
flow controls (commonly
used on e.g. RS-232).
Unresolved directive in <stdin> - include::tables/_hdr.adoc[] Unresolved directive in <stdin> - include::tables/ctrl.adoc[]
=== ASCII Printable Characters (DEC 32-127, OCT 040-177, HEX 20-7f) .Printable Characters Unresolved directive in <stdin> - include::tables/_hdr.adoc[] Unresolved directive in <stdin> - include::tables/print.adoc[] |
Extended ASCII Characters
(DEC 128-255, OCT 200-377, HEX 80-ff)
Unresolved directive in <stdin> - include::tables/_hdr.adoc[] Unresolved directive in <stdin> - include::tables/extend.adoc[]
=== Combined Table (All Characters/Codes) (DEC 0-255, OCT 000-377, HEX 00-ff) The following table is a combined table of the previous three sections for ease of reference. .All Characters Unresolved directive in <stdin> - include::tables/_hdr.adoc[] Unresolved directive in <stdin> - include::tables/ctrl.adoc[] Unresolved directive in <stdin> - include::tables/print.adoc[] Unresolved directive in <stdin> - include::tables/extend.adoc[] |