From dad87a360bdd99595ea9061f9c06bbacb4aceb9d Mon Sep 17 00:00:00 2001 From: DS Date: Mon, 23 Aug 2021 14:09:50 +0200 Subject: Use utf-8 for the Irrlicht clipboard (#11538) --- src/gui/guiChatConsole.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/gui/guiChatConsole.cpp') diff --git a/src/gui/guiChatConsole.cpp b/src/gui/guiChatConsole.cpp index 85617d862..049e21a16 100644 --- a/src/gui/guiChatConsole.cpp +++ b/src/gui/guiChatConsole.cpp @@ -338,7 +338,7 @@ void GUIChatConsole::drawText() false, false, &AbsoluteClippingRect); - } else + } else #endif { // Otherwise use standard text @@ -580,8 +580,7 @@ bool GUIChatConsole::OnEvent(const SEvent& event) const c8 *text = os_operator->getTextFromClipboard(); if (!text) return true; - std::basic_string str((const unsigned char*)text); - prompt.input(std::wstring(str.begin(), str.end())); + prompt.input(utf8_to_wide(text)); return true; } else if(event.KeyInput.Key == KEY_KEY_X && event.KeyInput.Control) -- cgit v1.2.3