1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00: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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
}
/*