This site is supported by donations to The OEIS Foundation.
Template:ASCII/doc
From OeisWiki
The {{ASCII}} OEIS Wiki utility template returns the ASCII code corresponding to the given ASCII character.
Usage
- {{ASCII|an ASCII character}}
Valid input
- An ASCII character as argument.
ASCII Table
Each item is separated by a space followed by a horizontal tab (see code below.)
<!-- Char -->NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI <!-- DEC -->00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 <!-- Char -->DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US <!-- DEC -->16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 <!-- Char -->SP ! " # $ % & ' ( ) * + , - . / <!-- DEC -->32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 <!-- Char -->0 1 2 3 4 5 6 7 8 9 : ; < = > ? <!-- DEC -->48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 <!-- Char -->@ A B C D E F G H I J K L M N O <!-- DEC -->64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 <!-- Char -->P Q R S T U V W X Y Z [ \ ] ^ _ <!-- DEC -->80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 <!-- Char -->` a b c d e f g h i j k l m n o <!-- DEC -->96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 <!-- Char -->p q r s t u v w x y z { | } ~ DEL <!-- DEC -->112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
Examples
Examples with valid input
Code Result Code Result Comment {{char|0}} NUL {{ASCII|{{char|0}}}} 0 {{char|1}} SOH {{ASCII|{{char|1}}}} 1 {{char|2}} STX {{ASCII|{{char|2}}}} 2 {{char|3}} ETX {{ASCII|{{char|3}}}} 3 {{char|4}} EOT {{ASCII|{{char|4}}}} 4 {{char|5}} ENQ {{ASCII|{{char|5}}}} 5 {{char|6}} ACK {{ASCII|{{char|6}}}} 6 {{char|7}} BEL {{ASCII|{{char|7}}}} 7 {{char|8}} BS {{ASCII|{{char|8}}}} 8 {{char|9}} HT {{ASCII|{{char|9}}}} 9 {{char|10}} LF {{ASCII|{{char|10}}}} 10 {{char|11}} VT {{ASCII|{{char|11}}}} 11 {{char|12}} FF {{ASCII|{{char|12}}}} 12 {{char|13}} CR {{ASCII|{{char|13}}}} 13 {{char|14}} SO {{ASCII|{{char|14}}}} 14 {{char|15}} SI {{ASCII|{{char|15}}}} 15 {{char|16}} DLE {{ASCII|{{char|16}}}} 16 {{char|17}} DC1 {{ASCII|{{char|17}}}} 17 {{char|18}} DC2 {{ASCII|{{char|18}}}} 18 {{char|19}} DC3 {{ASCII|{{char|19}}}} 19 {{char|20}} DC4 {{ASCII|{{char|20}}}} 20 {{char|21}} NAK {{ASCII|{{char|21}}}} 21 {{char|22}} SYN {{ASCII|{{char|22}}}} 22 {{char|23}} ETB {{ASCII|{{char|23}}}} 23 {{char|24}} CAN {{ASCII|{{char|24}}}} 24 {{char|25}} EM {{ASCII|{{char|25}}}} 25 {{char|26}} SUB {{ASCII|{{char|26}}}} 26 {{char|27}} ESC {{ASCII|{{char|27}}}} 27 {{char|28}} FS {{ASCII|{{char|28}}}} 28 {{char|29}} GS {{ASCII|{{char|29}}}} 29 {{char|30}} RS {{ASCII|{{char|30}}}} 30 {{char|31}} US {{ASCII|{{char|31}}}} 31 {{char|32}} {{ASCII|{{char|32}}}} 32 (a space) {{char|32}} {{ASCII| }} 32 (a space) {{char|32}} {{ASCII|}} 32 (a space) {{char|32}} {{ASCII}} 32 (a space) {{char|33}} ! {{ASCII|{{char|33}}}} 33 {{char|34}} " {{ASCII|{{char|34}}}} 34 {{char|35}} # {{ASCII|{{char|35}}}} 35 {{char|35}} # {{ASCII|{{//=}}}} ASCII error: Argument must be an ASCII character Cf. Template://= {{char|35}} # {{ASCII|#}} 35 {{char|35}} # {{ASCII|#}} 35 {{char|36}} $ {{ASCII|{{char|36}}}} 36 {{char|37}} % {{ASCII|{{char|37}}}} 37 {{char|38}} & {{ASCII|{{char|38}}}} 38 {{char|39}} ' {{ASCII|{{char|39}}}} 39 {{char|40}} ( {{ASCII|{{char|40}}}} 40 {{char|41}} ) {{ASCII|{{char|41}}}} 41 {{char|42}} * {{ASCII|{{char|42}}}} 42 {{char|42}} * {{ASCII|{{*}}}} ASCII error: Argument must be an ASCII character Cf. Template:* {{char|42}} * {{ASCII|*}} 42 {{char|42}} * {{ASCII|*}} 42 {{char|43}} + {{ASCII|{{char|43}}}} 43 {{char|44}} , {{ASCII|{{char|44}}}} 44 {{char|45}} - {{ASCII|{{char|45}}}} 45 {{char|46}} . {{ASCII|{{char|46}}}} 46 {{char|47}} / {{ASCII|{{char|47}}}} 47 {{char|48}} 0 {{ASCII|{{char|48}}}} 48 {{char|49}} 1 {{ASCII|{{char|49}}}} 49 {{char|50}} 2 {{ASCII|{{char|50}}}} 50 {{char|51}} 3 {{ASCII|{{char|51}}}} 51 {{char|52}} 4 {{ASCII|{{char|52}}}} 52 {{char|53}} 5 {{ASCII|{{char|53}}}} 53 {{char|54}} 6 {{ASCII|{{char|54}}}} 54 {{char|55}} 7 {{ASCII|{{char|55}}}} 55 {{char|56}} 8 {{ASCII|{{char|56}}}} 56 {{char|57}} 9 {{ASCII|{{char|57}}}} 57 {{char|58}} : {{ASCII|{{char|58}}}} 58 {{char|58}} : {{ASCII|{{colon}}}} ASCII error: Argument must be an ASCII character Cf. Template:Colon {{char|58}} : {{ASCII|:}} 58 {{char|58}} : {{ASCII|:}} 58 {{char|59}} ; {{ASCII|{{char|59}}}} 59 {{char|59}} ; {{ASCII|{{;}}}} ASCII error: Argument must be an ASCII character Cf. Template:; {{char|59}} ; {{ASCII|;}} 59 {{char|59}} ; {{ASCII|;}} 59 {{char|60}} < {{ASCII|{{char|60}}}} 60 {{char|61}} = {{ASCII|{{char|61}}}} 61 {{char|61}} = {{ASCII|{{=}}}} 61 Cf. Template:= {{char|61}} = {{ASCII|=}} 61 {{char|61}} = {{ASCII|=}} 32 (a space)
(one empty parameter)
{{char|62}} > {{ASCII|{{char|62}}}} 62 {{char|63}} ? {{ASCII|{{char|63}}}} 63 {{char|64}} @ {{ASCII|{{char|64}}}} 64 {{char|65}} A {{ASCII|{{char|65}}}} 65 {{char|66}} B {{ASCII|{{char|66}}}} 66 {{char|67}} C {{ASCII|{{char|67}}}} 67 {{char|68}} D {{ASCII|{{char|68}}}} 68 {{char|69}} E {{ASCII|{{char|69}}}} 69 {{char|70}} F {{ASCII|{{char|70}}}} 70 {{char|71}} G {{ASCII|{{char|71}}}} 71 {{char|72}} H {{ASCII|{{char|72}}}} 72 {{char|73}} I {{ASCII|{{char|73}}}} 73 {{char|74}} J {{ASCII|{{char|74}}}} 74 {{char|75}} K {{ASCII|{{char|75}}}} 75 {{char|76}} L {{ASCII|{{char|76}}}} 76 {{char|77}} M {{ASCII|{{char|77}}}} 77 {{char|78}} N {{ASCII|{{char|78}}}} 78 {{char|79}} O {{ASCII|{{char|79}}}} 79 {{char|80}} P {{ASCII|{{char|80}}}} 80 {{char|81}} Q {{ASCII|{{char|81}}}} 81 {{char|82}} R {{ASCII|{{char|82}}}} 82 {{char|83}} S {{ASCII|{{char|83}}}} 83 {{char|84}} T {{ASCII|{{char|84}}}} 84 {{char|85}} U {{ASCII|{{char|85}}}} 85 {{char|86}} V {{ASCII|{{char|86}}}} 86 {{char|87}} W {{ASCII|{{char|87}}}} 87 {{char|88}} X {{ASCII|{{char|88}}}} 88 {{char|89}} Y {{ASCII|{{char|89}}}} 89 {{char|90}} Z {{ASCII|{{char|90}}}} 90 {{char|91}} [ {{ASCII|{{char|91}}}} 91 {{char|92}} \ {{ASCII|{{char|92}}}} 92 {{char|93}} ] {{ASCII|{{char|93}}}} 93 {{char|94}} ^ {{ASCII|{{char|94}}}} 94 {{char|95}} _ {{ASCII|{{char|95}}}} 95 (an underscore) {{char|96}} ` {{ASCII|{{char|96}}}} 96 {{char|97}} a {{ASCII|{{char|97}}}} 97 {{char|98}} b {{ASCII|{{char|98}}}} 98 {{char|99}} c {{ASCII|{{char|99}}}} 99 {{char|100}} d {{ASCII|{{char|100}}}} 100 {{char|101}} e {{ASCII|{{char|101}}}} 101 {{char|102}} f {{ASCII|{{char|102}}}} 102 {{char|103}} g {{ASCII|{{char|103}}}} 103 {{char|104}} h {{ASCII|{{char|104}}}} 104 {{char|105}} i {{ASCII|{{char|105}}}} 105 {{char|106}} j {{ASCII|{{char|106}}}} 106 {{char|107}} k {{ASCII|{{char|107}}}} 107 {{char|108}} l {{ASCII|{{char|108}}}} 108 {{char|109}} m {{ASCII|{{char|109}}}} 109 {{char|110}} n {{ASCII|{{char|110}}}} 110 {{char|111}} o {{ASCII|{{char|111}}}} 111 {{char|112}} p {{ASCII|{{char|112}}}} 112 {{char|113}} q {{ASCII|{{char|113}}}} 113 {{char|114}} r {{ASCII|{{char|114}}}} 114 {{char|115}} s {{ASCII|{{char|115}}}} 115 {{char|116}} t {{ASCII|{{char|116}}}} 116 {{char|117}} u {{ASCII|{{char|117}}}} 117 {{char|118}} v {{ASCII|{{char|118}}}} 118 {{char|119}} w {{ASCII|{{char|119}}}} 119 {{char|120}} x {{ASCII|{{char|120}}}} 120 {{char|121}} y {{ASCII|{{char|121}}}} 121 {{char|122}} z {{ASCII|{{char|122}}}} 122 {{char|123}} { {{ASCII|{{char|123}}}} 123 {{char|124}} | {{ASCII|{{char|124}}}} 124 {{char|124}} | {{ASCII|{{!}}}} 124 Cf. Template:! {{char|124}} | {{ASCII||}} 124 {{char|124}} | {{ASCII||}} 32 (a space)
(2 empty parameters)
{{char|125}} } {{ASCII|{{char|125}}}} 125 {{char|126}} ~ {{ASCII|{{char|126}}}} 126 {{char|127}} DEL {{ASCII|{{char|127}}}} 127
Examples with invalid input (returns an error message)
Code Result Comment {{ASCII|NIL}} ASCII error: Argument must be an ASCII character
Code
<noinclude>{{documentation}}</noinclude><includeonly><!-- <!== Each item is separated by a space followed by a horizontal tab (for nice alignment, but not recognized by #explode:) Char ==>NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI <!== DEC ==>00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 <!== Char ==>DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US <!== DEC ==>16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 <!== Char ==>SP ! " # $ % & ' ( ) * + , - . / <!== DEC ==>32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 <!== Char ==>0 1 2 3 4 5 6 7 8 9 : ; < = > ? <!== DEC ==>48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 <!== Char ==>@ A B C D E F G H I J K L M N O <!== DEC ==>64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 <!== Char ==>P Q R S T U V W X Y Z [ \ ] ^ _ <!== DEC ==>80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 <!== Char ==>` a b c d e f g h i j k l m n o <!== DEC ==>96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 <!== Char ==>p q r s t u v w x y z { | } ~ DEL <!== DEC ==>112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 --><!-- Special characters for MediaWiki server: # is used for numbered lists, and also as separator between pagename and anchorname. * is used for bulleted lists. : is used as separator between namespace and pagename, e.g. Template:Name, and also as separator between attribute name and attribute value. ; is used as separator between attributes. = is used as separator between template parameter name and parameter value. | is used as separator between template parameters, and also as separator between wikitable columns. -->{{#switch: {{#if: {{{1|}}} | {{{1|}}} | SP }}<!-- default is a space --> | NUL = 0 | SOH = 1 | STX = 2 | ETX = 3 | EOT = 4 | ENQ = 5 | ACK = 6 | BEL = 7 | BS = 8 | HT = 9 | LF = 10 | VT = 11 | FF = 12 | CR = 13 | SO = 14 | SI = 15 | DLE = 16 | DC1 = 17 | DC2 = 18 | DC3 = 19 | DC4 = 20 | NAK = 21 | SYN = 22 | ETB = 23 | CAN = 24 | EM = 25 | SUB = 26 | ESC = 27 | FS = 28 | GS = 29 | RS = 30 | US = 31 | SP = 32 | ! = 33 | " = 34 | # = 35 | $ = 36 | % = 37 | & = 38 | ' = 39 | ( = 40 | ) = 41 | * = 42 | + = 43 | , = 44 | - = 45 | . = 46 | / = 47 | 0 = 48 | 1 = 49 | 2 = 50 | 3 = 51 | 4 = 52 | 5 = 53 | 6 = 54 | 7 = 55 | 8 = 56 | 9 = 57 | : = 58 | ; = 59 | < = 60 |{{=}}= 61 | > = 62 | ? = 63 | @ = 64 | A = 65 | B = 66 | C = 67 | D = 68 | E = 69 | F = 70 | G = 71 | H = 72 | I = 73 | J = 74 | K = 75 | L = 76 | M = 77 | N = 78 | O = 79 | P = 80 | Q = 81 | R = 82 | S = 83 | T = 84 | U = 85 | V = 86 | W = 87 | X = 88 | Y = 89 | Z = 90 | [ = 91 | \ = 92 | ] = 93 | ^ = 94 | _ = 95 | ` = 96 | a = 97 | b = 98 | c = 99 | d = 100 | e = 101 | f = 102 | g = 103 | h = 104 | i = 105 | j = 106 | k = 107 | l = 108 | m = 109 | n = 110 | o = 111 | p = 112 | q = 113 | r = 114 | s = 115 | t = 116 | u = 117 | v = 118 | w = 119 | x = 120 | y = 121 | z = 122 | { = 123 |{{!}}= 124 | } = 125 | ~ = 126 | DEL = 127 | {{error| ASCII error: Argument must be an ASCII character }} <!--{{#switch: {{urlencode: {{{1}}} }} | %21 = 33 | %22 = 34 | %23 = 35 | %24 = 36 | %25 = 37 | %26 = 38 | %27 = 39 | %28 = 40 | %29 = 41 | %2A = 42 | %2B = 43 | %2C = 44 | %2D = 45 | %2E = 46 | %2F = 47 | %30 = 48 | %31 = 49 | %32 = 50 | %33 = 51 | %34 = 52 | %35 = 53 | %36 = 54 | %37 = 55 | %38 = 56 | %39 = 57 | %3A = 58 | %3B = 59 | %3C = 60 | %3D = 61 | %3E = 62 | %3F = 63 | %40 = 64 | %41 = 65 | %42 = 66 | %43 = 67 | %44 = 68 | %45 = 69 | %46 = 70 | %47 = 71 | %48 = 72 | %49 = 73 | %4A = 74 | %4B = 75 | %4C = 76 | %4D = 77 | %4E = 78 | %4F = 79 | %50 = 80 | %51 = 81 | %52 = 82 | %53 = 83 | %54 = 84 | %55 = 85 | %56 = 86 | %57 = 87 | %58 = 88 | %59 = 89 | %5A = 90 | %5B = 91 | %5C = 92 | %5D = 93 | %5E = 94 | %5F = 95 | %60 = 96 | %61 = 97 | %62 = 98 | %63 = 99 | %64 = 100 | %65 = 101 | %66 = 102 | %67 = 103 | %68 = 104 | %69 = 105 | %6A = 106 | %6B = 107 | %6C = 108 | %6D = 109 | %6E = 110 | %6F = 111 | %70 = 112 | %71 = 113 | %72 = 114 | %73 = 115 | %74 = 116 | %75 = 117 | %76 = 118 | %77 = 119 | %78 = 120 | %79 = 121 | %7A = 122 | %7B = 123 | %7C = 124 | %7D = 125 | %7E = 126 | }}--> }}</includeonly>
See also
- {{Char}} (template to get the ASCII character corresponding to a given ASCII code)