Unicode fix for using iconv on little-endian machines.

This commit is contained in:
unitrunker
2018-01-21 23:53:09 -06:00
parent c7434afed8
commit e9c381e1de
2 changed files with 3 additions and 3 deletions

View File

@@ -981,7 +981,7 @@ namespace detail
{
const wchar_t* charbuf;
nana::detail::charset_conv charset("UTF-32", "UTF-8");
nana::detail::charset_conv charset(NANA_UNICODE, "UTF-8");
const std::string& str = charset.charset(std::string(keybuf, keybuf + len));
charbuf = reinterpret_cast<const wchar_t*>(str.c_str()) + 1;
len = str.size() / sizeof(wchar_t) - 1;