fix compile errors under Linux

This commit is contained in:
Jinhao
2015-12-16 01:21:44 +08:00
parent c260eebbc3
commit 2ca11d4e25
21 changed files with 274 additions and 279 deletions

View File

@@ -14,6 +14,7 @@
#include <nana/deploy.hpp>
#include <cstdlib>
#include <cstring> //std::strlen
#include <stdexcept>
#if defined(NANA_WINDOWS)
@@ -472,6 +473,13 @@ namespace nana
throw std::invalid_argument("The text is not encoded in UTF8");
}
void throw_not_utf8(const char* text)
{
if (!is_utf8(text, std::strlen(text)))
throw std::invalid_argument("The text is not encoded in UTF8");
}
std::wstring utf8_cast(const std::string& text)
{
return ::nana::charset(text, ::nana::unicode::utf8);