fix compile errors under Linux
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user