ASCII stands for American Standard Code for Information Interchange. It describes an encoding for letters, numbers and punctuation symbols that can be realized in seven bits. It uses only seven of the 8 bits for historical reasons to allow the eighth bit to be used for parity control when the characters are transmitted through serial interfaces.
Many of the character codes are reserved to send control signals to terminals and to manage the communications. Modern networking provides this capability outside of the character encoding.
There is an extended ASCII encoding that provides all 8 bits for character code mapping. This defines the upper 127 characters in addition to the lower 127 characters in the 7-bit representation.
There are many alternative interpretations of the ASCII character set that allow for national extensions to the character set. In some cases, this may only result in the replacement of a few currency symbols.
JavaScript uses the Unicode character set. The lower 127 characters of Unicode are purposely mapped to the ASCII character. ASCII is described here to provide help when you are exchanging data files with ASCII based systems or applications.
It may also be useful in some situations if you are using JavaScript to drive a serial interface to control some external system. Whether you could do that would depend on the hosting environment. A browser wouldn't give you those capabilities, but an embedded JavaScript interpreter in a process control system may well allow you to do that sort of thing.
This table summarizes the lower 127 characters in the ASCII character set.
Dec | Hex | Sym | Unicode | Description |
000 | 00 | NUL | \u0000 | <ctrl-@> Null character |
001 | 01 | SOH | \u0001 | <ctrl-A> Start of header |
002 | 02 | STX | \u0002 | <ctrl-B> Start of text |
003 | 03 | ETX | \u0003 | <ctrl-C> End of text |
004 | 04 | EOT | \u0004 | <ctrl-D> End of transmission |
005 | 05 | ENQ | \u0005 | <ctrl-E> Enquiry |
006 | 06 | ACK | \u0006 | <ctrl-F> Positive acknowledge |
007 | 07 | BEL | \u0007 | <ctrl-G> Alert (bell) |
008 | 08 | BS | \u0008 | <ctrl-H> Backspace |
009 | 09 | HT | \u0009 | <ctrl-I> Horizontal tab |
010 | 0A | LF | \u000A | <ctrl-J> Line feed |
011 | 0B | VT | \u000B | <ctrl-K> Vertical tab |
012 | 0C | FF | \u000C | <ctrl-L> Form feed |
013 | 0D | CR | \u000D | <ctrl-M> Carriage return |
014 | 0E | SO | \u000E | <ctrl-N> Shift out |
015 | 0F | SI | \u000F | <ctrl-O> Shift in |
016 | 10 | DLE | \u0010 | <ctrl-P> Data link escape |
017 | 11 | DC1 | \u0011 | <ctrl-Q> Device control 1 (XON) |
018 | 12 | DC2 | \u0012 | <ctrl-R> Device control 2 (tape on) |
019 | 13 | DC3 | \u0013 | <ctrl-S> Device control 3 (XOFF) |
020 | 14 | DC4 | \u0014 | <ctrl-T> Device control 4 (tape off) |
021 | 15 | NAK | \u0015 | <ctrl-U> Negative acknowledgement |
022 | 16 | SYN | \u0016 | <ctrl-V> Synchronous idle |
023 | 17 | ETB | \u0017 | <ctrl-W> End of transmission block |
024 | 18 | CAN | \u0018 | <ctrl-X> Cancel |
025 | 19 | EM | \u0019 | <ctrl-Y> End of medium |
026 | 1A | SUB | \u001A | <ctrl-Z> Substitute |
027 | 1B | ESC | \u001B | <ctrl-[> Escape |
028 | 1C | FS | \u001C | <ctrl-\> File separator (Form separator) |
029 | 1D | GS | \u001D | <ctrl-]> Group separator |
030 | 1E | RS | \u001E | <ctrl-^> Record separator |
031 | 1F | US | \u001F | <ctrl-_> Unit separator |
032 | 20 | SP | \u0020 | Space |
033 | 21 | ! | \u0021 | Exclamation point (bang) |
034 | 22 | " | \u0022 | Double quote |
035 | 23 | # | \u0023 | Hash (number sign, pound sign, sharp) |
036 | 24 | $ | \u0024 | Dollar sign (buck) |
037 | 25 | % | \u0025 | Percent sign |
038 | 26 | & | \u0026 | Ampersand |
039 | 27 | ' | \u0027 | Apostrophe (single quote) |
040 | 28 | ( | \u0028 | Left parenthesis |
041 | 29 | ) | \u0029 | Right parenthesis |
042 | 2A | * | \u002A | Astrisk (star) |
043 | 2B | + | \u002B | Plus sign |
044 | 2C | , | \u002C | Comma |
045 | 2D | - | \u002D | Minus sign (hyphen) |
046 | 2E | . | \u002E | Period (full stop, dot, point) |
047 | 2F | / | \u002F | Slash (virgule, solidus) |
048 | 30 | 0 | \u0030 | - |
049 | 31 | 1 | \u0031 | - |
050 | 32 | 2 | \u0032 | - |
051 | 33 | 3 | \u0033 | - |
052 | 34 | 4 | \u0034 | - |
053 | 35 | 5 | \u0035 | - |
054 | 36 | 6 | \u0036 | - |
055 | 37 | 7 | \u0037 | - |
056 | 38 | 8 | \u0038 | - |
057 | 39 | 9 | \u0039 | - |
058 | 3A | : | \u003A | Colon |
059 | 3B | ; | \u003B | Semi-colon |
060 | 3C | < | \u003C | Left caret (less than, left angle bracket) |
061 | 3D | = | \u003D | Equal sign |
062 | 3E | > | \u003E | Right caret (greater than, right angle bracket) |
063 | 3F | ? | \u003F | Question mark |
064 | 40 | @ | \u0040 | Commercial at sign |
065 | 41 | A | \u0041 | - |
066 | 42 | B | \u0042 | - |
067 | 43 | C | \u0043 | - |
068 | 44 | D | \u0044 | - |
069 | 45 | E | \u0045 | - |
070 | 46 | F | \u0046 | - |
071 | 47 | G | \u0047 | - |
072 | 48 | H | \u0048 | - |
073 | 49 | I | \u0049 | - |
074 | 4A | J | \u004A | - |
075 | 4B | K | \u004B | - |
076 | 4C | L | \u004C | - |
077 | 4D | M | \u004D | - |
078 | 4E | N | \u004E | - |
079 | 4F | O | \u004F | - |
080 | 50 | P | \u0050 | - |
081 | 51 | Q | \u0051 | - |
082 | 52 | R | \u0052 | - |
083 | 53 | S | \u0053 | - |
084 | 54 | T | \u0054 | - |
085 | 55 | U | \u0055 | - |
086 | 56 | V | \u0056 | - |
087 | 57 | W | \u0057 | - |
088 | 58 | X | \u0058 | - |
089 | 59 | Y | \u0059 | - |
090 | 5A | Z | \u005A | - |
091 | 5B | [ | \u005B | Left square bracket |
092 | 5C | \ | \u005C | Backslash (reverse solidus) |
093 | 5D | ] | \u005D | Right square bracket |
094 | 5E | ^ | \u005E | Circumflex accent |
095 | 5F | _ | \u005F | Underscore (low line) |
096 | 60 | ` | \u0060 | Grave accent (back quote, back tick) |
097 | 61 | a | \u0061 | - |
098 | 62 | b | \u0062 | - |
099 | 63 | c | \u0063 | - |
100 | 64 | d | \u0064 | - |
101 | 65 | e | \u0065 | - |
102 | 66 | f | \u0066 | - |
103 | 67 | g | \u0067 | - |
104 | 68 | h | \u0068 | - |
105 | 69 | i | \u0069 | - |
106 | 6A | j | \u006A | - |
107 | 6B | k | \u006B | - |
108 | 6C | l | \u006C | - |
109 | 6D | m | \u006D | - |
110 | 6E | n | \u006E | - |
111 | 6F | o | \u006F | - |
112 | 70 | p | \u0070 | - |
113 | 71 | q | \u0071 | - |
114 | 72 | r | \u0072 | - |
115 | 73 | s | \u0073 | - |
116 | 74 | t | \u0074 | - |
117 | 75 | u | \u0075 | - |
118 | 76 | v | \u0076 | - |
119 | 77 | w | \u0077 | - |
120 | 78 | x | \u0078 | - |
121 | 79 | y | \u0079 | - |
122 | 7A | z | \u007A | - |
123 | 7B | { | \u007B | Left brace (left curly bracket) |
124 | 7C | | | \u007C | Verical line (bar, pipe) |
125 | 7D | } | \u007D | Right brace (right curly bracket) |
126 | 7E | ~ | \u007E | Tilde |
127 | 7F | DEL | \u007F | Delete |
Prev | Home | Next |
Array simulation | Up | ASP |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |