diff options
author | DS <vorunbekannt75@web.de> | 2021-08-23 14:09:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-23 14:09:50 +0200 |
commit | dad87a360bdd99595ea9061f9c06bbacb4aceb9d (patch) | |
tree | e86d651560d7edc42255b61fba4398689d400f70 /src/gui/guiChatConsole.cpp | |
parent | fad835cf6452c01fc254023cf2d6166baf1ba277 (diff) | |
download | minetest-dad87a360bdd99595ea9061f9c06bbacb4aceb9d.tar.xz |
Use utf-8 for the Irrlicht clipboard (#11538)
Diffstat (limited to 'src/gui/guiChatConsole.cpp')
-rw-r--r-- | src/gui/guiChatConsole.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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<unsigned char> 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) |