41 typedef std::basic_string<TCHAR>
tstring ;
47 explicit utf8(
const std::string & s_ ) :
s(s_) {}
59 static void convert(
utf8 & utf_out ,
const std::string & in_ ) ;
65 static void convert(
utf8 & utf_out ,
const std::wstring & in_ ) ;
68 static void convert( std::string & ansi_out ,
const std::string & in_ ) ;
71 static void convert( std::string & ansi_out ,
const std::string & in_ ,
78 static void convert( std::string & ansi_out ,
const std::wstring & in_ ,
const ThrowOnError & ) ;
81 static void convert( std::wstring & out_ ,
const std::string & in_ ) ;
84 static void convert( std::wstring & out_ ,
const utf8 & in_ ) ;
87 static void convert( std::wstring & out_ ,
const std::wstring & in_ ) ;
91 static std::string narrow(
const std::wstring & s ,
bool is_utf8 ,
const std::string & = std::string() ) ;
92 static std::wstring widen(
const std::string & s ,
bool is_utf8 ,
const std::string & = std::string() ) ;
static void convert(utf8 &utf_out, const std::string &in_)
Converts between string types/encodings.
A static class which provides string encoding conversion functions.
utf8(const std::string &s_)
std::basic_string< TCHAR > tstring
Holds error context information for when convert() may fail.
A string wrapper that indicates UTF-8 encoding.
ThrowOnError(const std::string &context_)
#define G_EXCEPTION_CLASS(class_name, description)