Home Web Front-end HTML Tutorial ASCII encoding table

ASCII encoding table

Apr 05, 2017 am 11:40 AM

ASCII is the abbreviation of American Standard Code for Information Interchange. ASCII code is currently the most common coding standard for computers. Because computers can only accept numeric information, ASCII codes represent characters as numbers so that the computer can accept and process them. For example, the ASCII code for the capital letter A is 65. In the ASCII code, Nos. 0 to 32 and No. 127 are control characters, commonly used ones are LF (line feed) and CR (carriage return); Nos. 33 to 126 are characters, of which Nos. 48 to 57 are 0 to 9 Arabic numerals; numbers 65 to 90 are 26 uppercase English letters, numbers 97 to 122 are 26 lowercase English letters, and the rest are some punctuation marks, arithmetic symbols, etc.

 ASCII character encoding table

#
ASCII value Control characters ASCII value Control characters ASCII value Control characters ASCII value Control characters
0 NUT 32 (space) 64 @ 96 ,
1 SOH 33 ! 65 A 97 a
2 STX 34 66 B 98 b
3 ETX 35 67 C 99 c
4 EOT 36 $ 68 D 100 d
5 ENQ 37 % 69 E 101 e
6 ACK 38 & 70 F 102 f
7 BEL 39 , 71 G 103 g
8 BS 40 ( 72 H 104 h
9 HT 41 ) 73 I 105 i
10 LF 42 * 74 J 106 j
11 VT 43 + 75 K 107 k
12 FF 44 , 76 L 108 l
13 CR 45 - 77 M 109 m
14 SO 46 . 78 N 110 n
15 SI 47 / 79 O 111 o
16 DLE 48 0 80 P 112 p
17 DCI 49 1 81 Q 113 q
18 DC2 50 2 82 R 114 r
19 DC3 51 3 83 X 115 s
20 DC4 52 4 84 T 116 t
21 NAK 53 5 85 U 117 u
22 SYN 54 6 86 V 118 v
23 TB 55 7 87 W 119 w
24 CAN 56 8 88 X 120 x
25 EM 57 9 89 Y 121 y
26 SUB 58 : 90 Z 122 z
27 ESC 59 ; 91 [ 123 {
28 FS 60 < 92 \ 124 |
29 GS 61 = 93 ] 125 }
30 RS 62 > 94 ^ 126 ~
31 US 63 ? 95 127 DEL

The ASCII value is a decimal number, and the meaning of the control characters is as shown in the following table.

NUL empty VT vertical tab SYN idle synchronization
SOH Title Start FF paper feed control End of ETB message group transmission
STX text begins CR carriage return CAN void
ETX End of text SO shift output EM paper ends
EOY end of transmission SI shift input SUB substitution
ENQ query character DLE space ESC code escape
ACK acknowledge DC1 Device Control 1 FS text separator
BEL alarm DC2 Device Control 2 GS group separator
BS back one space DC3 device control 3 RS record separator
HT horizontal list DC4 Device Control 4 US unit separator
LF line feed NAK negation DEL delete

Since the number of characters in the standard ASCII character set is limited, it often cannot meet the requirements in practical applications. To this end, the International Organization for Standardization has formulated the ISO2022 standard, which stipulates a unified method for extending the ASCII character set to 8-bit codes while maintaining compatibility with ISO646. ISO has successively formulated a batch of extended ASCII character sets suitable for different regions. Each extended ASCII character set can be extended by 128 characters. The encoding of these extended characters is an 8-bit code with a high bit of 1 (that is, decimal numbers 128~255 ), called extended ASCII code.

Extended ASCII characters satisfy the need for more characters. Extended ASCII contains the 128 characters already in ASCII (numbers 0–32 are shown in the image below), plus an additional 128 characters for a total of 256.

The above is the detailed content of ASCII encoding table. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How many bytes does one ascii character occupy? How many bytes does one ascii character occupy? Mar 09, 2023 pm 03:49 PM

One ascii character occupies 1 byte. ASCII code characters are represented by 7-bit or 8-bit binary encoding in the computer and are stored in one byte, that is, one ASCII code occupies one byte. ASCII code can be divided into standard ASCII code and extended ASCII code. Standard ASCII code is also called basic ASCII code. It uses 7-bit binary numbers (the remaining 1 binary digit is 0) to represent all uppercase and lowercase letters, and the numbers 0 to 9. Punctuation marks, and special control characters used in American English.

Quickly learn about ASCII value conversion in PHP Quickly learn about ASCII value conversion in PHP Mar 28, 2024 pm 06:42 PM

ASCII value conversion in PHP is a problem often encountered in programming. ASCII (American Standard Code for Information Interchange) is a standard encoding system for converting characters into numbers. In PHP, we often need to convert between characters and numbers through ASCII code. This article will introduce how to convert ASCII values ​​in PHP and give specific code examples. 1. Change the characters

PHP returns the ASCII value of the first character of the string PHP returns the ASCII value of the first character of the string Mar 21, 2024 am 11:01 AM

This article will explain in detail the ASCII value of the first character of the string returned by PHP. The editor thinks it is very practical, so I share it with you as a reference. I hope you can gain something after reading this article. PHP returns the ASCII value of the first character of a string Introduction In PHP, getting the ASCII value of the first character of a string is a common operation that involves basic knowledge of string processing and character encoding. ASCII values ​​are used to represent the numeric value of characters in computer systems and are critical for character comparison, data transmission and storage. The process of getting the ASCII value of the first character of a string involves the following steps: Get String: Determine the string for which you want to get the ASCII value. It can be a variable or a string constant

What are the differences between unicode and ascii What are the differences between unicode and ascii Sep 06, 2023 am 11:56 AM

The differences between unicode and ascii include different encoding ranges, different storage spaces, and different compatibility. Detailed introduction: 1. The encoding range is different. The encoding range of ASCII is 0-127, which is mainly used to represent English letters. The encoding range of Unicode is much wider and can represent almost all language characters; 2. The storage space is different. ASCII usually Use 1 byte to store a character, while unicode may use 2 or more bytes to store a character; 3. Different compatibility, etc.

How to accurately convert PHP string to ASCII code How to accurately convert PHP string to ASCII code Mar 27, 2024 am 10:48 AM

&quot;How to accurately convert PHP strings to ASCII codes, specific code examples are needed&quot; In the field of programming, ASCII (American Standard Code for Information Interchange) code is the standard encoding system used to represent characters in computer systems. In PHP, we often need to convert strings into ASCII codes for some operations or processing. Here's how to accurately convert a string to ASCII in PHP

A brief analysis of the conversion method of characters and ascii values ​​in php A brief analysis of the conversion method of characters and ascii values ​​in php Mar 24, 2023 pm 12:57 PM

In the PHP programming language, ASCII conversion is a very important skill. ASCII (American Standard Code for Information Interchange) is a character encoding that maps each character to a unique numeric value. In PHP, you may need to convert characters in a string to their corresponding ASCII values, or vice versa. In this article, we will explore how to do ASCII conversion in PHP,

Let PHP easily complete the operation of character conversion to ASCII code Let PHP easily complete the operation of character conversion to ASCII code Mar 26, 2024 pm 02:48 PM

Title: Let PHP easily complete the operation of converting characters to ASCII codes. In programming, we often encounter the operation of converting characters to ASCII codes. As a popular server-side scripting language, PHP also provides a simple and efficient way to achieve it. this conversion. This article will introduce how to use PHP to easily convert characters to ASCII code, as well as specific code examples. First, we need to understand the ASCII code (AmericanStandardCodeforInformati

Sharing tips on converting characters to ASCII code in PHP Sharing tips on converting characters to ASCII code in PHP Mar 27, 2024 pm 08:33 PM

Tips for converting characters to ASCII codes in PHP. In PHP development, sometimes we need to convert characters to ASCII codes. This is a very common operation in processing strings, encryption algorithms, etc. This article will share some techniques for converting characters to ASCII codes in PHP, and provide specific code examples to help everyone better understand and apply them. 1. Convert a single character to ASCII code First, let’s look at how to convert a single character to ASCII code. In PHP, you can use the ord() function to

See all articles