Encoding¶
Encoding is the process of transforming data from one format into another agreed-upon universal code system/scheme
Types of Encoding¶
- URL Encoding
- HTML Encoding
- Base 36/64 Encoding
- Unicode Encoding
URL Encoding ¶
URL Encoding is a filter that converts certain characters of a URL into % and is followed by the hexadecimal equivalent of the character.
example
- #:- %23
- ?:- %3f
- &:- %3f
HTML Encoding ¶
The document transmitted via HTTP can send a charset parameter in the header containing Content-Type.
Content-Type:text/html; charset=utf-8
Base36/64 Encoding¶
Binary to Text encoding, in addition to Base16 encoding scheme Base36 and Base 64 are introduced.
Base36
It is the most case sensitive encoding scheme, as it contains all the numbers from[0-9] and latine letters [a-z]
example
Binary | Base36 |
---|---|
0001 | 1 |
1010 | a |
Base64
It is the most widespread encoding scheme, it allows the represent binary data into ASCII strings. Base64 is not an encryption technique. it contains [0-9], [a-z], [A-Z] and to complete the count of 64 + and slash / are added. it divides a string into 6bits.
example
Binary | Base64 |
---|---|
0000 | A |
011010 | a |
111110 | + |
Unicode Encoding ¶
Unicode Encoding contains glyphs, numbers and etc.
There are three ways to map encode character points
- UTF-8
- UTF-16
- UTF-32