Percentage coding


percent encoding - URL encoding defined in RFC1738 used for URI encoding. It is mainly used to encode the data sent by the GET query in the URL. The name implies that the given byte is encoded with a percent sign. Encoding a byte is to convert it to a two-digit hexadecimal value stored in ASCII and preceded by that percentage (that is, each encoded byte is written with triangles). You do not need to encode characters from A to Z, from a to z, from 0 to 9, and the characters '-', '_', '.', '~'. You can replace the spaces with the '+' sign. If the character has a special meaning in the URI (eg '/'), it is not encoded unless it exists in the data. Example in the GET query

We have an HTML form.html <meta charset="utf-8"/> <form action="http://www.w3schools.com/html/html_forms.asp" method="get"> & lt; input type = "text" name = "name" value = "Karol Lukasz" & gt; <input type="text" name="haslo/kod" value="4/2_a=8+4=_ ?"> <input type="submit" value="Wyslij"> </form>

When you click on the browser, it will send the data by going to: http://www.w3schools.com/html/html_forms.asp?image=Karol+%C5%81ukam&haslo%2Fkod=4%2F2_a%3D8%2B4 % 3D _ +% 3F 1. If '/' is present in the data, it is encoded to '% 2F'. However, if this character has a special meaning for the protocol name or distributes the directory, it is not encrypted. Similarly with special characters?, =, & Amp ;. 2. Letters outside the ASCII range are encoded. In this case 'Ł' as '% C5% 81' because in utf8 this character is written with two bytes, then both have to be encoded in percentage.

wiki

Comments

Popular posts from this blog

Pupo Román

Myrmex Indikos

Names of streets and squares