X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Fwidestring.h;h=1e4f9a2640cd2cd09d35af5b84cbdc5fd96f2f6a;hp=67ffdbb7090864741f717d921581aa6e4fb882c0;hb=HEAD;hpb=13ed6ca4807f938eba70592b2cb728cd3b632115 diff --git a/bigscreen/widestring.h b/bigscreen/widestring.h index 67ffdbb..1e4f9a2 100644 --- a/bigscreen/widestring.h +++ b/bigscreen/widestring.h @@ -2,6 +2,7 @@ #define _WIDESTRING_H 1 #include +#include // UCS-4 string with support for getting from UTF-8 class widestring : public std::wstring @@ -12,6 +13,18 @@ public: 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) */