Unicode fix for using iconv on little-endian machines.
This commit is contained in:
parent
c7434afed8
commit
e9c381e1de
@ -339,8 +339,8 @@ namespace detail
|
|||||||
string.tab_pixels = 0;
|
string.tab_pixels = 0;
|
||||||
string.whitespace_pixels = 0;
|
string.whitespace_pixels = 0;
|
||||||
#if defined(NANA_USE_XFT)
|
#if defined(NANA_USE_XFT)
|
||||||
conv_.handle = ::iconv_open("UTF-8", "UTF-32");
|
conv_.handle = ::iconv_open("UTF-8", NANA_UNICODE);
|
||||||
conv_.code = "UTF-32";
|
conv_.code = NANA_UNICODE;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -981,7 +981,7 @@ namespace detail
|
|||||||
{
|
{
|
||||||
const wchar_t* charbuf;
|
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));
|
const std::string& str = charset.charset(std::string(keybuf, keybuf + len));
|
||||||
charbuf = reinterpret_cast<const wchar_t*>(str.c_str()) + 1;
|
charbuf = reinterpret_cast<const wchar_t*>(str.c_str()) + 1;
|
||||||
len = str.size() / sizeof(wchar_t) - 1;
|
len = str.size() / sizeof(wchar_t) - 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user