Skip to content

Commit

Permalink
Add basic unicode support to the console (linux workaround)
Browse files Browse the repository at this point in the history
  • Loading branch information
EXio4 authored and PilzAdam committed Jun 15, 2013
1 parent 3e4f146 commit 93dfc3e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/guiChatConsole.cpp
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 93dfc3e

Please sign in to comment.