X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bigscreen%2Fwidestring.h;h=a2f2a245423322042d234d226df6e1be89ac9d89;hb=0fad64f1f8ecc79312e6d27aac1bc0b3feff84c1;hp=437428c8ad316ff2c05341935053fb81c2275f07;hpb=00cc6937fb4d2d0525c90536697fc88eea3d0d6e;p=ccbs diff --git a/bigscreen/widestring.h b/bigscreen/widestring.h index 437428c..a2f2a24 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 @@ -9,7 +10,20 @@ 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); }; +namespace pqxx +{ + +template<> +inline void from_string(const char *from, widestring &to) +{ + to = from; +} + +} + #endif /* !defined(_WIDESTRING_H) */