From 93dfc3ec70007ab684ef71487081f0335eae0635 Mon Sep 17 00:00:00 2001 From: "Esteban I. Ruiz Moreno" Date: Tue, 4 Jun 2013 22:14:31 -0300 Subject: Add basic unicode support to the console (linux workaround) --- src/guiChatConsole.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/guiChatConsole.cpp') diff --git a/src/guiChatConsole.cpp b/src/guiChatConsole.cpp index c1219fb80..daec18efc 100644 --- a/src/guiChatConsole.cpp +++ b/src/guiChatConsole.cpp @@ -550,7 +550,13 @@ bool GUIChatConsole::OnEvent(const SEvent& event) } else if(event.KeyInput.Char != 0 && !event.KeyInput.Control) { - m_chat_backend->getPrompt().input(event.KeyInput.Char); + #if (defined(linux) || defined(__linux)) + wchar_t wc = L'_'; + mbtowc( &wc, (char *) &event.KeyInput.Char, sizeof(event.KeyInput.Char) ); + m_chat_backend->getPrompt().input(wc); + #else + m_chat_backend->getPrompt().input(event.KeyInput.Char); + #endif return true; } } -- cgit v1.2.3