- 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
|
|
@ -247,3 +247,13 @@ const char *MakeUTF8(const char *outline, int *numchars = nullptr)
|
|||
UTF8String.Push(0);
|
||||
return UTF8String.Data();
|
||||
}
|
||||
|
||||
const char *MakeUTF8(int codepoint, int *psize)
|
||||
{
|
||||
int size = 0;
|
||||
UTF8String.Resize(5);
|
||||
utf8_encode(codepoint, (uint8_t*)UTF8String.Data(), &size);
|
||||
UTF8String[size] = 0;
|
||||
if (psize) *psize = size;
|
||||
return UTF8String.Data();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue