GH #290: Unicode support

This commit is contained in:
Alex Fabijanic
2014-05-21 03:28:24 -05:00
parent 8b39a87fd6
commit 1aa28e1491
46 changed files with 1168 additions and 114 deletions

View File

@@ -108,6 +108,23 @@ public:
convert(f, l, t);
}
template <typename T>
static T to(const char* pChar)
{
T utfStr;
Poco::UnicodeConverter::convert(pChar, utfStr);
return utfStr;
}
template <typename T>
static T to(const std::string& str)
{
T utfStr;
Poco::UnicodeConverter::convert(str, utfStr);
return utfStr;
}
template <typename T>
static std::size_t UTFStrlen(const T* ptr)
/// Returns the length (in characters) of a zero-terminated UTF string.