Skip to content

Commit 93dfc3e

Browse files
EXio4PilzAdam
authored andcommittedJun 15, 2013
Add basic unicode support to the console (linux workaround)
1 parent 3e4f146 commit 93dfc3e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎src/guiChatConsole.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,13 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
550550
}
551551
else if(event.KeyInput.Char != 0 && !event.KeyInput.Control)
552552
{
553-
m_chat_backend->getPrompt().input(event.KeyInput.Char);
553+
#if (defined(linux) || defined(__linux))
554+
wchar_t wc = L'_';
555+
mbtowc( &wc, (char *) &event.KeyInput.Char, sizeof(event.KeyInput.Char) );
556+
m_chat_backend->getPrompt().input(wc);
557+
#else
558+
m_chat_backend->getPrompt().input(event.KeyInput.Char);
559+
#endif
554560
return true;
555561
}
556562
}

0 commit comments

Comments
 (0)
Please sign in to comment.