Questions tagged [ascii]

A character-encoding scheme based on the ordering of the English alphabet. ASCII stands for American Standard Code for Information Interchange.

ASCII codes represent text in computers, communications equipment, and other devices that use text. Most modern character-encoding schemes are based on ASCII, though they support many more characters than did ASCII.

ASCII includes definitions for 128 characters: 33 are non-printing control characters (now mostly obsolete) that affect how text and space is processed; 94 are printable characters, and the space is considered an invisible graphic. The most commonly used character encoding on the World Wide Web was US-ASCII until December 2007, when it was surpassed by UTF-8.

The following table contains the 128 ASCII characters.

Char  Dec  Oct Hex | Char Dec  Oct Hex | Char Dec  Oct Hex | Char Dec  Oct  Hex
(nul)   0 0000 x00 | (sp)  32 0040 x20 | @     64 0100 x40 | `      96 0140 x60
(soh)   1 0001 x01 | !     33 0041 x21 | A     65 0101 x41 | a      97 0141 x61
(stx)   2 0002 x02 | "     34 0042 x22 | B     66 0102 x42 | b      98 0142 x62
(etx)   3 0003 x03 | #     35 0043 x23 | C     67 0103 x43 | c      99 0143 x63
(eot)   4 0004 x04 | $     36 0044 x24 | D     68 0104 x44 | d     100 0144 x64
(enq)   5 0005 x05 | %     37 0045 x25 | E     69 0105 x45 | e     101 0145 x65
(ack)   6 0006 x06 | &     38 0046 x26 | F     70 0106 x46 | f     102 0146 x66
(bel)   7 0007 x07 | '     39 0047 x27 | G     71 0107 x47 | g     103 0147 x67
(bs)    8 0010 x08 | (     40 0050 x28 | H     72 0110 x48 | h     104 0150 x68
(ht)    9 0011 x09 | )     41 0051 x29 | I     73 0111 x49 | i     105 0151 x69
(nl)   10 0012 x0a | *     42 0052 x2a | J     74 0112 x4a | j     106 0152 x6a
(vt)   11 0013 x0b | +     43 0053 x2b | K     75 0113 x4b | k     107 0153 x6b
(np)   12 0014 x0c | ,     44 0054 x2c | L     76 0114 x4c | l     108 0154 x6c
(cr)   13 0015 x0d | -     45 0055 x2d | M     77 0115 x4d | m     109 0155 x6d
(so)   14 0016 x0e | .     46 0056 x2e | N     78 0116 x4e | n     110 0156 x6e
(si)   15 0017 x0f | /     47 0057 x2f | O     79 0117 x4f | o     111 0157 x6f
(dle)  16 0020 x10 | 0     48 0060 x30 | P     80 0120 x50 | p     112 0160 x70
(dc1)  17 0021 x11 | 1     49 0061 x31 | Q     81 0121 x51 | q     113 0161 x71
(dc2)  18 0022 x12 | 2     50 0062 x32 | R     82 0122 x52 | r     114 0162 x72
(dc3)  19 0023 x13 | 3     51 0063 x33 | S     83 0123 x53 | s     115 0163 x73
(dc4)  20 0024 x14 | 4     52 0064 x34 | T     84 0124 x54 | t     116 0164 x74
(nak)  21 0025 x15 | 5     53 0065 x35 | U     85 0125 x55 | u     117 0165 x75
(syn)  22 0026 x16 | 6     54 0066 x36 | V     86 0126 x56 | v     118 0166 x76
(etb)  23 0027 x17 | 7     55 0067 x37 | W     87 0127 x57 | w     119 0167 x77
(can)  24 0030 x18 | 8     56 0070 x38 | X     88 0130 x58 | x     120 0170 x78
(em)   25 0031 x19 | 9     57 0071 x39 | Y     89 0131 x59 | y     121 0171 x79
(sub)  26 0032 x1a | :     58 0072 x3a | Z     90 0132 x5a | z     122 0172 x7a
(esc)  27 0033 x1b | ;     59 0073 x3b | [     91 0133 x5b | {     123 0173 x7b
(fs)   28 0034 x1c | <     60 0074 x3c | \     92 0134 x5c | |     124 0174 x7c
(gs)   29 0035 x1d | =     61 0075 x3d | ]     93 0135 x5d | }     125 0175 x7d
(rs)   30 0036 x1e | >     62 0076 x3e | ^     94 0136 x5e | ~     126 0176 x7e
(us)   31 0037 x1f | ?     63 0077 x3f | _     95 0137 x5f | (del) 127 0177 x7f
6938 questions
2
votes
1 answer

vb.net Arithmetic operation resulted in an overflow

I am getting following error: Arithmetic operation resulted in an overflow on the code below: Public Function DoEncode(ByVal aPassword As String, ByVal aPassword2 As String) As String Dim ascii As New ASCIIEncoding() Dim b As…
rowneyo
  • 54
  • 4
2
votes
1 answer

SQL NVARCHAR(MAX) returning ASCII and Weird Characters instead of Text

I have an SQL Table and I'm trying to return the values as a string. The values should be city names like Sydney, Melbourne, Port Maquarie etc. But When I run a select I either get black results or as detailed in the first picture some strange…
L0ckz0r
  • 169
  • 1
  • 9
2
votes
1 answer

Python 3 itertools.islice continue despite UnicodeDecodeError

I have a python 3 program that monitors a log file. The log includes, among other things, chat messages written by users. The log is created by a third party application which I cannot change. Today a user wrote "텋��텋��" and it caused the program to…
2
votes
0 answers

Running Python zipapp as base64?

I recently discovered the magic of __main__.py when trying to run the same script on thousands of Linux servers, probably no two of which have exactly the same config. One of the limitations of our archaic system automation tool is that it only…
Steve Bonds
  • 221
  • 3
  • 5
2
votes
1 answer

Bit Sequence to ASCII to String

I'm trying to simulate a Hamming-Code 4,7 which is working properly. I'm working with boolean arrays insted of really bits to simplify it a bit logically. I input some Characters, there converted to ASCII and the Simulation goes on. After all I end…
user5544265
2
votes
2 answers

how to convert an integer value to a specific ascii character in c++

I'm new to C++ and I'm trying to do something that should be pretty basic. I have a small loop in C++ that just displays a sequence of numbers and I would like to convert these numbers into specific ASCII characters. Something like this: for…
mar1980
  • 31
  • 2
2
votes
1 answer

Delphi XE7: How can I make XSuperObject output accented characters?

uses ... XSuperObject; procedure TForm1.Button1Click(Sender: TObject); var Json: ISuperObject; begin Memo1.Lines.Add('{"Evênements":"Noël"}'); Json := SO('{"Evênements":"Noël"}'); Memo1.Lines.Add(Json.AsJSON(True)); end; This code…
Rob
  • 155
  • 1
  • 12
2
votes
3 answers

How to print return from overloaded methods in Java

I'm trying to sum the Ascii values of different strings while adhering to the following instructions: Create two overloaded methods. One that will give the sum of the ascii values of each character in a String and another which will produce…
Bob
  • 69
  • 10
2
votes
1 answer

Problems with getBytes, if leftmost bit is 1, next bit is always 0

I have after a lot of troubleshooting managed to get an encoder and decoder workin where I input a number, it turns it into binary and then ASCII, returns that, I feed that into the other one, it turns the ASCII into binary and then strings that…
Mojken
  • 23
  • 4
2
votes
1 answer

How to handle Ascii character in Android Layout

Related Question I do have to show different Ascii character in TextView. Character are: ( `·´ ) (\\/)(°,,,°)(\\/) ( ⚆ _ ⚆ ) If I used above character and display on screen. I got this: But when you look at the first character. It's displaying…
user5060176
2
votes
5 answers

Printing characters (Ascii) in a row/table format with a for loop and if statement?

I've got to print out the Ascii codes in a table format (10 chars per row...) At the moment I have them printing all in order. However I'd like to print 10 characters then println and print another 10... I believe I should be able to do this with…
Anthony J
  • 551
  • 1
  • 9
  • 19
2
votes
2 answers

DOS ASCII Animation Lagging without constant input, Turbo C compiled

Here's an oddity from the past! I'm writing an ASCII Pong game for the command prompt (Yes yes oldschool) and I'm writing to the video memory directly (Add. 0xB8000000) so I know I'm rendering quickly (As opposed to gotoxy and then printf…
Parad0x13
  • 2,007
  • 3
  • 23
  • 38
2
votes
2 answers

Got unicode error when send string parameter over D-Bus

I try to use python dbus module to connect to WEP security WiFi I fill the network configuration dictionary like as follows: nw_config['wep_key0'] = binascii.unhexlify(mypassword) mypassword is hex-string when mypassword is set to '12345678' there…
Anakin Tung
  • 419
  • 5
  • 17
2
votes
1 answer

inconsistent sort behavior

I have a sample file containg "aA0_- " characters on each one on a single. Sorting it using GNU sort gives the following sort order: $ cat /tmp/sample | sort _ - 0 a A after appending some other character, we obtain a different order…
mykhal
  • 19,175
  • 11
  • 72
  • 80
2
votes
2 answers

How to convert HEX to ASCII in ActionScript

For example, is there any methods existing in ActionScript that can convert 0x4e544c4d into ASCII string "NTLM"?
1 2 3
99
100