summaryrefslogtreecommitdiff
path: root/src/guiChatConsole.cpp
diff options
context:
space:
mode:
authorEsteban I. Ruiz Moreno <exio4.com@gmail.com>2013-06-04 22:14:31 -0300
committerPilzAdam <pilzadam@minetest.net>2013-06-15 15:09:11 +0000
commit93dfc3ec70007ab684ef71487081f0335eae0635 (patch)
tree3bc8d0962a6dcc43cf44c6433153204f7c7736d8 /src/guiChatConsole.cpp
parent3e4f1462bcccedddf67fa30574c5e4e740f82262 (diff)
downloadminetest-93dfc3ec70007ab684ef71487081f0335eae0635.tar.gz
minetest-93dfc3ec70007ab684ef71487081f0335eae0635.tar.bz2
minetest-93dfc3ec70007ab684ef71487081f0335eae0635.zip
Add basic unicode support to the console (linux workaround)
Diffstat (limited to 'src/guiChatConsole.cpp')
-rw-r--r--src/guiChatConsole.cpp8
1 files changed, 7 insertions, 1 deletions
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;
}
}