1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 08:35:20 +02:00

Android: fix handling non-latin characters on older Android devices (#9309)

This commit is contained in:
Maksim
2020-04-17 23:46:30 +02:00
committed by GitHub
parent 4e2473ec49
commit 23c6d0c31f
2 changed files with 16 additions and 0 deletions

View File

@@ -3031,8 +3031,16 @@ std::wstring Server::handleChat(const std::string &name, const std::wstring &wna
line += L"-!- You don't have permission to shout.";
broadcast_line = false;
} else {
/*
Workaround for fixing chat on Android. Lua doesn't handle
the Cyrillic alphabet and some characters on older Android devices
*/
#ifdef __ANDROID__
line += L"<" + wname + L"> " + wmessage;
#else
line += narrow_to_wide(m_script->formatChatMessage(name,
wide_to_narrow(wmessage)));
#endif
}
/*