ot::net
class URLDecoder
#include "ot/net/URLDecoder.h"
A class module containing static methods for decoding strings that have been transmitted as an escaped URL.
Decode
static String Decode(const String& s)
-
Converts an escaped string in the MIME x-www-form-urlencoded format into a plain Unicode string.
To convert a URL, each character is examined in turn:
-
The ASCII characters 'a' through 'z', 'A' through 'Z', '0' through '9', and ".", "-", "*", "_" remain the same.
-
The plus sign '+' is converted into a space character (U+0020)
-
The remaining characters are represented by 3-character strings which begin with the percent sign, "xy", where xy is the two-digit hexadecimal representation of the UTF-8 encoded character.
- See also:
-
URLEncoder::Encode()
RawDecode
static String RawDecode(const String& s)
-
Converts a raw-encoded URI string into a Unicode String.
This method performs a similar function to Decode(), but the algorithm has been modified to complement the URLEncoder::RawEncode() function which performs an idempotent transformation.
The algorithm employed is described in the W3C XML recommendation section 4.2.2, External Entities.
Found a bug or missing feature? Please email us at support@elcel.com