Show: Delphi C++
Display Preferences

System.NetEncoding.TURLEncoding

From RAD Studio API Documentation
Jump to: navigation, search

System.NetEncoding.TNetEncodingSystem.TObjectTURLEncoding

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: +) and the following reserved URL encoding characters: ;:&=+,/?%#[]. 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

TBytes

EncodeBytesToString

String

DecodeStringToBytes

TBytes

TBytes

Encode

TBytes

Decode

TBytes

TStream

TStream

TStream

String

String

String

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.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance