Home > Web Front-end > H5 Tutorial > Organize the URL encoding and character encoding supported in HTML5_html5 tutorial skills

Organize the URL encoding and character encoding supported in HTML5_html5 tutorial skills

WBOY
Release: 2016-05-16 15:45:51
Original
4862 people have browsed it

URL encoding
URL encoding is to convert unprintable characters or characters with special meaning in URLs into a representation that is understood and generally accepted by web browsers and servers. These characters include:

ASCII control characters - Unprintable characters often used for output control. The character range is 00-1F hexadecimal (0-31 decimal) and 7F (127 decimal). A complete coding sheet is provided below.

Non-ASCII control characters - These characters are outside the range of the 128-bit ASCII character set. This range is part of the ISO-Latin character set and the "first half" of the ISO-Latin character set containing the entire hexadecimal 00-FF (decimal 128-255) range. A complete coding sheet is provided below.

Reserved characters - symbols such as dollar sign, ampersand, plus sign, universal sign, forward slash, colon, separator, equal sign, question mark, and "at". All these symbols have different meanings within the URL and therefore require encoding. A complete coding sheet is provided below.

Unsafe characters - including space, question mark, less than sign, greater than sign, pound character, percent sign, left part of curly brace, right part of curly brace, pipe character, backslash, caret, tilde. Left square bracket, right square bracket, grave accent. For some reason, these characters present in URLs have the potential to be misinterpreted. These characters should always be encoded as well. A complete coding sheet is provided below. The
encoding representation requires three characters to replace the expected character: a percent sign, two hexadecimal digits indicating the character position in the ASCII character set,

Example
One of the most common special characters is the space. We cannot directly enter a space in the URL. A space is equal to 20 in hexadecimal in the character set. Therefore, you can use to represent spaces when requesting the server.


Copy code
The code is as follows:
http://www.example.com/new pricing .html

This URL actually retrieves a document called new pricing.html from www.example.com.

ASCII control character encoding
includes hexadecimal 00-1F (decimal 0-31) and 7F (decimal 127) character codes.

十进制格式 十六进制值 字符 URL 编码
0 00
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template