X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Fwidestring.h;h=1e4f9a2640cd2cd09d35af5b84cbdc5fd96f2f6a;hp=67f00b5b59d96eae4d9b35474ca7a35141287606;hb=HEAD;hpb=da6c03044674863de9f8a017010aa579b3b27a12 diff --git a/bigscreen/widestring.h b/bigscreen/widestring.h index 67f00b5..1e4f9a2 100644 --- a/bigscreen/widestring.h +++ b/bigscreen/widestring.h @@ -2,13 +2,29 @@ #define _WIDESTRING_H 1 #include +#include // UCS-4 string with support for getting from UTF-8 class widestring : public std::wstring { public: + widestring(); widestring(const char *from); + widestring(const std::string &from); + widestring(const std::wstring &from); void operator= (const char *from); + std::string to_utf8() const; }; +namespace pqxx +{ + +template<> +inline void from_string(const char *from, widestring &to) +{ + to = from; +} + +} + #endif /* !defined(_WIDESTRING_H) */