1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 16:45:20 +02:00

Use utf-8 for the Irrlicht clipboard (#11538)

This commit is contained in:
DS
2021-08-23 14:09:50 +02:00
committed by GitHub
parent fad835cf64
commit dad87a360b
2 changed files with 9 additions and 11 deletions

View File

@@ -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)