From: number Zero Date: Sat, 9 Jun 2018 14:31:35 +0000 (+0300) Subject: Fix narrow/utf8 difference in incoming/outcoming messages X-Git-Tag: 0.4.17.1~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=24a2fd4dc4918038fb587cfebe00f02fef03a347;p=oweals%2Fminetest.git Fix narrow/utf8 difference in incoming/outcoming messages --- diff --git a/src/script/lua_api/l_server.cpp b/src/script/lua_api/l_server.cpp index a0e475dec..bb1d75221 100644 --- a/src/script/lua_api/l_server.cpp +++ b/src/script/lua_api/l_server.cpp @@ -74,7 +74,7 @@ int ModApiServer::l_chat_send_all(lua_State *L) // Get server from registry Server *server = getServer(L); // Send - server->notifyPlayers(narrow_to_wide(text)); + server->notifyPlayers(utf8_to_wide(text)); return 0; } @@ -88,7 +88,7 @@ int ModApiServer::l_chat_send_player(lua_State *L) // Get server from registry Server *server = getServer(L); // Send - server->notifyPlayer(name, narrow_to_wide(text)); + server->notifyPlayer(name, utf8_to_wide(text)); return 0; }