Php ascii code table and character conversion details. PHP Basics: ASCII code comparison table and character conversion, discuss ASCII code table chart and character conversion to decimal, octal, hexadecimal, and HTML methods comm
ASCII values can be roughly divided into three parts.
Part 1There are 32 characters in total from 00 h to 1fh, which are generally used for controlling or controlling. Some characters can be displayed on the screen, some of them cannot be displayed on the screen, but can see the effect (such as the line character and character ). See the following table:
Part 2There are 96 characters in total from 20 h
Display characters in tabular form1. Title: displaying ASCII characters in tabular format2. Requirements: Display the ASCII code as 10h-100h all characters in the table Form of the row x16 column, that is, the corresponding characters are displayed in the order of the line-based sequence and the ASCII code increment. I
PHP detailed ASCII code comparison table and character conversion. 1. general ASCII code table schematic ASCII code table chart. take character A as an example to describe decimal. for example, 65Hx indicates Hexadecimal. for exam
We are doing business projects, the client's input is always out of control, there are a variety of special characters, these special characters have to rely on the ASCII code table to judge, so I made a picture, easy to seeWhy do you want to make a watch out, the following string, you see if you can see what special word Fuma (middle blank place)20160807 1Don't see it, let's see what 16 binary is$ hexdump
in a byte must be an even number. If the number is not an even number, 1 is added to the highest bit of b7.Appendix:ASCII table
ASCII Value
Control characters
ASCII Value
Control characters
ASCII Value
Control characters
Complete 8-bit ASCII two-dimensional table
ASCII and American Standard Code for information interchange read as "astkey", which defines the English letters or the same result and meaning represented by the 127 numbers ranging from 0 to one hundred and twenty-eight. Because only seven digits (BIT) can be used to represent numbers from 0 to 127, most computers use
The value range of the ASCII code is 0 ~ 127, which can be expressed in 7 bits. C LanguagecharThe variable size is defined as one byte. If the ASCII code is stored, only seven characters are used, and the value is 0. The following is an ascii code table:
Figure A.1. ASCII c
One, the Universal ASCII code table
graphic ASCII code comparison chart , with character A as an exampleDec denotes decimal, such as 65HX denotes hexadecimal, such as 41The OCT represents octal, such as 101Char represents a display character, such as aASCII code comparison chart is divided into two units1, control characters 0-31 and 1272, can display characte
Document directory
ASCII code table
ASCII code table
The following table lists the 0-127 characters in the character set.
Code
Character
Code
Character
Code
Character
Code
Character
0
32
[Space]
64
@
96
`
0th ~ 32 and 127th (34 in total) are control characters or communication special characters, suchControl letter: LF (line feed), Cr (Press ENTER), FF (page feed), del (delete), BEL (zhenling), etc;Communication special characters: Soh, EOT, ack, etc;
33rd ~ 126 (94 in total) is a character, of which 48th ~ Number 57 is 0 ~ 9. 10 Arabic numerals;
65 ~ The 90 is 26 uppercase English letters, 97 ~ There are 26 lower-case English letters, and the remaining are some punctuation marks and operator num
ASCII Code table 0-127
Bin
Dec
Hex
Abbreviation/character
Explain
00000000
0
00
NUL (NULL)
Null character
00000001
1
01
SOH (start of headling)
Title Start
00000010
2
02
STX (start of text)
Body Start
00000011
3
03
ETX (end of text)
End of
Each Chinese Character of gb2312 and GBK consists of two bytes. the ASCII values of these two bytes are:Gb2312:
High8 = 0xa1 --> 0xfe (161-254)Low8 = 0xa1 --> 0xfe (161-254)
GBK:
High8 = 0x80 --> 0xfe (128-254)Low8 = 0x40 --> 0xfe (64-254)
Difference between gb2312 and GBK: http://zhidao.baidu.com/question/40269499
How to print the Chinese ASCII table:
// Print
Source from Baidu Library, record for query
ASCII character table
Dec
Oct
HEX
Key
Comments
Chinese name
0
0
0
CTRL -@
Nul (null)
NULL Character
1
1
1
CTRL-A
Soh (start of heading)
Title start (CTRL/)
2
2
2
CTRL-B
STX (start of text)
Text start (CTRL/B)
3
3
3
CTRL-C
ASCII non-printable memory table
Decimal
Character
Decimal
Character
0
Null
16
Data Link Conversion
1
Header start
17
Device Control 1
2
Start of Text
18
Device Control 2
3
Text ended
19
Device Control 3
4
Transfer completed
20
Device Control 4
5
Query
21
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.