A class for handling character enconding/decoding.
More...
#include <CharEncoding.h>
|
static std::string | convert (const std::string &src, EncodingType from, EncodingType to) |
| Convert a string from one character encoding to another one. More...
|
|
static std::string | fromUTF8 (const std::string &src) |
| Convert a string in UTF-8 to the current locale encoding. More...
|
|
static std::string | fromUTF8 (const std::string &src, EncodingType to) |
| Convert a string in UTF-8 to another character encoding. More...
|
|
static std::vector< std::string > | getEncodingList () |
| Retrive a vector of string with all available encoding types name. More...
|
|
static std::string | getEncodingName (EncodingType et) |
| Retrive a string from a given character encoding type enum. More...
|
|
static te::core::EncodingType | getEncodingType (const std::string &name) |
| Retrive an EncodingType from a given character encoding name. More...
|
|
static std::string | toASCII (const std::string &src) |
| Decomposes a UTF-8 encoded string and extracts its ASCII characters. More...
|
|
static std::string | toUTF8 (const std::string &src) |
| Convert a string from a current locale encoding to UTF-8. More...
|
|
static std::string | toUTF8 (const std::string &src, EncodingType from) |
| Convert a string from a given character encoding to UTF-8. More...
|
|
A class for handling character enconding/decoding.
Definition at line 67 of file CharEncoding.h.
te::core::CharEncoding::CharEncoding |
( |
| ) |
|
|
private |
te::core::CharEncoding::~CharEncoding |
( |
| ) |
|
|
private |
te::core::CharEncoding::CharEncoding |
( |
CharEncoding const & |
| ) |
|
|
private |
Convert a string from one character encoding to another one.
- Parameters
-
src | String encoded according to "from" encoding type. |
from | Current string encoding. |
to | New encoding for the string. |
- Returns
- String in a new encoding.
static std::string te::core::CharEncoding::fromUTF8 |
( |
const std::string & |
src | ) |
|
|
static |
static std::string te::core::CharEncoding::fromUTF8 |
( |
const std::string & |
src, |
|
|
EncodingType |
to |
|
) |
| |
|
static |
Convert a string in UTF-8 to another character encoding.
- Parameters
-
src | UTF-8 string. |
to | The target character encoding. |
- Returns
- String encoded according to new character encoding.
static std::vector<std::string> te::core::CharEncoding::getEncodingList |
( |
| ) |
|
|
static |
Retrive a vector of string with all available encoding types name.
- Returns
- A vector of encoding type as string.
static std::string te::core::CharEncoding::getEncodingName |
( |
EncodingType |
et | ) |
|
|
static |
Retrive a string from a given character encoding type enum.
- Parameters
-
et | Encoding Type to be retrieved as string. |
- Returns
- Encoding Type as string.
Retrive an EncodingType from a given character encoding name.
- Parameters
-
name | Encoding name to be retrieved as enum. |
- Returns
- Encoding as enum.
static std::string te::core::CharEncoding::toASCII |
( |
const std::string & |
src | ) |
|
|
static |
Decomposes a UTF-8 encoded string and extracts its ASCII characters.
- Note
- Non-ascii characters will be skipped.
- Parameters
-
- Exceptions
-
- Returns
- ASCII String.
static std::string te::core::CharEncoding::toUTF8 |
( |
const std::string & |
src | ) |
|
|
static |
Convert a string from a current locale encoding to UTF-8.
- Parameters
-
src | String to be encoded in UTF-8. |
- Exceptions
-
- Returns
- String encoded in UTF-8.
static std::string te::core::CharEncoding::toUTF8 |
( |
const std::string & |
src, |
|
|
EncodingType |
from |
|
) |
| |
|
static |
Convert a string from a given character encoding to UTF-8.
- Parameters
-
src | String to be encoded in UTF-8. |
- Returns
- String encoded in UTF-8.
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_master/src/terralib/core/encoding/CharEncoding.h