Fix narrow/utf8 difference in incoming/outcoming messages
authornumber Zero <silverunicorn2011@yandex.ru>
Sat, 9 Jun 2018 14:31:35 +0000 (17:31 +0300)
committersfan5 <sfan5@live.de>
Sun, 10 Jun 2018 15:18:11 +0000 (17:18 +0200)
src/script/lua_api/l_server.cpp

index a0e475decaa267a50864f60a78aa058498f7be5c..bb1d75221473c48b2bdd581bd1773bcae9772f77 100644 (file)
@@ -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;
 }