mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Use UTF-8 instead of narrow
Use wide_to_utf8 and utf8_to_wide instead of wide_to_narrow and narrow_to_wide at almost all places. Only exceptions: test functions for narrow conversion, and chat, which is done in a separate commit.
This commit is contained in:
@@ -929,7 +929,7 @@ s32 GUITable::allocString(const std::string &text)
|
||||
std::map<std::string, s32>::iterator it = m_alloc_strings.find(text);
|
||||
if (it == m_alloc_strings.end()) {
|
||||
s32 id = m_strings.size();
|
||||
std::wstring wtext = narrow_to_wide(text);
|
||||
std::wstring wtext = utf8_to_wide(text);
|
||||
m_strings.push_back(core::stringw(wtext.c_str()));
|
||||
m_alloc_strings.insert(std::make_pair(text, id));
|
||||
return id;
|
||||
|
Reference in New Issue
Block a user