Cope with the encoded Internet world using System.NetEncodings
Internet is the land of the encodings! URIs are encoded, HTML provide specific encodings, e-mails works because of the mime encoding, and the REST service works because in some way the client and server can talk each other using some sort of encodings! There are many kinds of encoding for different purposes, but in this recipe we will talk about the encodings handled by the classes contained in the System.NetEncodings.pas
unit.
Getting ready
The unit System.NetEncodings
contains the following classes:
TNetEncoding
: This class is a factory for the actual encoding classes; moreover, it serves as a base class for all the other classesTHTMLEncoding
: This class provides methods to encode and decode data in HTML formatTURLEncoding
: This class provides methods to encode and decode data in URL encodingTBase64Encoding
: This class provides methods to encode and decode data in thebase64
format
base64
is a binary-to-text encoding schemes...