From 0e4048661c0dbcce8744d6dcc7c5807d2606fec3 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Mon, 11 Feb 2019 12:45:37 +0200 Subject: [PATCH] Fixed: Copy to clipboard mangles utf8 chars --HG-- branch : develop --- code/nel/src/gui/action_handler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/nel/src/gui/action_handler.cpp b/code/nel/src/gui/action_handler.cpp index 2d2246937..e4809c00f 100644 --- a/code/nel/src/gui/action_handler.cpp +++ b/code/nel/src/gui/action_handler.cpp @@ -748,8 +748,12 @@ namespace NLGUI { 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()); + } } }; REGISTER_ACTION_HANDLER(CAHCopyToClipboard, "copy_to_clipboard");