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.
 
◆ CharEncoding() [1/2]
  
  
      
        
          | te::core::CharEncoding::CharEncoding  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
 
◆ ~CharEncoding()
  
  
      
        
          | te::core::CharEncoding::~CharEncoding  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
 
◆ CharEncoding() [2/2]
  
  
      
        
          | te::core::CharEncoding::CharEncoding  | 
          ( | 
          CharEncoding const &  | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
 
◆ convert()
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. 
 
 
 
◆ fromUTF8() [1/2]
  
  
      
        
          | static std::string te::core::CharEncoding::fromUTF8  | 
          ( | 
          const std::string &  | 
          src | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Convert a string in UTF-8 to the current locale encoding. 
- Parameters
 - 
  
  
 
- Exceptions
 - 
  
  
 
- Returns
 - String encoded according to new character encoding. 
 
 
 
◆ fromUTF8() [2/2]
  
  
      
        
          | 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. 
 
 
 
◆ getEncodingList()
  
  
      
        
          | 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. 
 
 
 
◆ getEncodingName()
  
  
      
        
          | 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. 
 
 
 
◆ getEncodingType()
Retrive an EncodingType from a given character encoding name. 
- Parameters
 - 
  
    | name | Encoding name to be retrieved as enum. | 
  
   
- Returns
 - Encoding as enum. 
 
 
 
◆ operator=()
◆ toASCII()
  
  
      
        
          | 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. 
 
 
 
◆ toUTF8() [1/2]
  
  
      
        
          | 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. 
 
 
 
◆ toUTF8() [2/2]
  
  
      
        
          | 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_release/src/terralib/core/encoding/CharEncoding.h