If a reserved character has a special meaning in a particular context (called "reserved Purpose"), and the character must be used for other purposes in the URI, the character must be a percent encoding. To encode a reserved character, you first need to represent the ASCII value of the character as a two 16-digit number, and then place the escape character ("%") before it, placing it in the corresponding position in the URI. (for non-ASCII characters, you need to convert to a UTF-8 byte order, and then each byte is represented in this manner.) )
Percent-semicolon encoding for reserved characters:
! (exclamation mark)%21
#%23
$%24
&%26
' (single quotation mark)%27
(%28
)%29
*%2A
+%2b
, (comma)%2c
/%2f
: (colon)%3a
; (semicolon)%3b
=%3d
? %3f
@%40
[%5b
]%5d
Reserved characters that have no special meaning in a particular context can also be encoded with a percent sign, which is semantically different from the character that is not percent-coded.
In the "query" component of the URI (the part after the? character), for example, "/" remains a reserved character but has no special meaning unless a particular URI has other rules that the/character does not require a percent code if it has no special meaning.
If a reserved character has a special meaning, a percent-encoded URI with the reserved character has different semantics than the URI that the reserved character uses only itself.