Fixed: Copy to clipboard mangles utf8 chars
--HG-- branch : develop
This commit is contained in:
parent
5e68a4e293
commit
0e4048661c
1 changed files with 5 additions and 1 deletions
|
@ -748,9 +748,13 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
virtual void execute (CCtrlBase *pCaller, const std::string ¶ms)
|
virtual void execute (CCtrlBase *pCaller, const std::string ¶ms)
|
||||||
{
|
{
|
||||||
if (!CViewRenderer::getInstance()->getDriver()->copyTextToClipboard(params))
|
ucstring s;
|
||||||
|
s.fromUtf8(params);
|
||||||
|
if (!CViewRenderer::getInstance()->getDriver()->copyTextToClipboard(s))
|
||||||
|
{
|
||||||
nlwarning("Copy to clipboard failed: '%s'", params.c_str());
|
nlwarning("Copy to clipboard failed: '%s'", params.c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER(CAHCopyToClipboard, "copy_to_clipboard");
|
REGISTER_ACTION_HANDLER(CAHCopyToClipboard, "copy_to_clipboard");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue