31 #ifndef __TERRALIB_CORE_ENCODING_CHARENCODING_H__ 
   32 #define __TERRALIB_CORE_ENCODING_CHARENCODING_H__ 
   35 #include "../Config.h" 
   79       static std::string 
fromUTF8(
const std::string& src);
 
  100       static std::string 
toUTF8(
const std::string& src);
 
  134       static std::string 
toASCII(
const std::string& src);
 
A class for handling character enconding/decoding.
 
static std::string toUTF8(const std::string &src)
Convert a string from a current locale encoding to UTF-8.
 
CharEncoding(CharEncoding const &)
 
static std::string toASCII(const std::string &src)
Decomposes a UTF-8 encoded string and extracts its ASCII characters.
 
static std::string convert(const std::string &src, EncodingType from, EncodingType to)
Convert a string from one character encoding to another one.
 
static std::string getEncodingName(EncodingType et)
Retrive a string from a given character encoding type enum.
 
static std::string fromUTF8(const std::string &src, EncodingType to)
Convert a string in UTF-8 to another character encoding.
 
static std::string fromUTF8(const std::string &src)
Convert a string in UTF-8 to the current locale encoding.
 
static te::core::EncodingType getEncodingType(const std::string &name)
Retrive an EncodingType from a given character encoding name.
 
CharEncoding & operator=(CharEncoding const &)
 
static std::vector< std::string > getEncodingList()
Retrive a vector of string with all available encoding types name.
 
static std::string toUTF8(const std::string &src, EncodingType from)
Convert a string from a given character encoding to UTF-8.
 
EncodingType
Supported character encodings.