|
ui-utilcpp
1.8.3
|
Converter for URL-Encoding. More...
#include <Recoder.hpp>


Public Member Functions | |
| URLConverter (bool const encode=true) | |
| Constructor; inEnc and outEnc are fixed by the encode flag. | |
| Conversion const * | make (char const *const buf, size_t const bufSize) const |
| Convert from byte buffer. | |
Public Member Functions inherited from UI::Util::Converter | |
| Converter (std::string const &inEnc, std::string const &outEnc, bool const &sloppy=false) | |
| Converter base constructor. | |
| Conversion const * | make (char const *const cStr) const |
| Convert from C-String. | |
| Conversion const * | make (std::string const &str) const |
| Convert from std::string. | |
| std::string | getID () const |
| Get id (informational). | |
Static Public Member Functions | |
| static std::string | encode (std::string const &url) |
| Encode an URL string. More... | |
| static std::string | decode (std::string const &url) |
| Decode an URL encoded string. More... | |
Additional Inherited Members | |
Public Types inherited from UI::Util::Converter | |
| enum | ErrorCode { EncUnknown_, ConversionErr_, UnknownErr_ } |
| Error codes for exceptions. | |
| typedef CodeException< ErrorCode > | Exception |
| Exceptions for this class. | |
Protected Attributes inherited from UI::Util::Converter | |
| std::string const | inEnc_ |
| std::string const | outEnc_ |
| bool const | sloppy_ |
Converter for URL-Encoding.
|
static |
Decode an URL encoded string.
The following rules are applied in the conversion: The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain the same. The special characters ".", "-", "*", and "_" remain the same. The plus sign "+" is converted into a space character " ". A sequence of the form "%xy" will be treated as representing a byte where xy is the two-digit hexadecimal representation of the 8 bits.
| url | the encoded URL string |
Referenced by make().
|
static |
Encode an URL string.
The following rules are applied in the conversion: The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain the same. The special characters ".", "-", "*", and "_" remain the same. The space character " " is converted into a plus sign "+". The other special characters will be converted in a sequence of the form "%xy" which epresenting a byte where xy is the two-digit hexadecimal representation of the 8 bits.
| url | the URL to encode |
Referenced by make().
1.8.9.1