System.NetEncoding.TURLEncoding
Delphi
TURLEncoding = class(TNetEncoding)
C++
class PASCALIMPLEMENTATION TURLEncoding : public TNetEncoding
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| class | public | System.NetEncoding.pas System.NetEncoding.hpp |
System.NetEncoding | System.NetEncoding |
Description
Provides methods to encode and decode data in URL encoding.
TURLEncoding only encodes spaces (as plus signs: +) when SpaceASPlus is specified and the following reserved URL encoding characters: ;:&=+,/?%#[]. If SpaceAsPlus is not specified, other characters and spaces will be encoded as %NN.TURLEncoding supports decoding plus signs (as spaces) and any percent-encoded character, such as %2A or %41.
TURLEncoding provides the following methods:
| Encoding | Decoding | ||||
|---|---|---|---|---|---|
| Input | Method | Output | Input | Method | Output |
For example:
Encode('A0*''()@$! ;:&=+,/?%#[]"')returns'A0*''()@$!+%3B%3A%26%3D%2B%2C%2F%3F%25%23%5B%5D%22'.Decode('%41%30%2A%27%28%29%40%24%21%20%3B%3A%26%3D%2B%2C%2F%3F%25%23%5B%5D%22')returns'A0*''()@$! ;:&=+,/?%#[]"'.
Input Strings for Decode and DecodeStringToBytes should be UTF8 encoded.