- made the menu's text input handler Unicode capable.
Also make sure that the savegame description remains readable. Unlike in-game text this can be done without double-encoding existing UTF-8.
This commit is contained in:
parent
54cb16ad8e
commit
deb233677e
13 changed files with 111 additions and 30 deletions
|
|
@ -412,14 +412,13 @@ public:
|
|||
|
||||
void AddChar(int character)
|
||||
{
|
||||
uint8_t encoded[5];
|
||||
int size;
|
||||
if (utf8_encode(character, encoded, &size) == 0)
|
||||
auto encoded = MakeUTF8(character, &size);
|
||||
if (*encoded != 0)
|
||||
{
|
||||
encoded[size] = 0;
|
||||
if (Text.IsEmpty())
|
||||
{
|
||||
Text = (char*)encoded;
|
||||
Text = encoded;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue