Fix umlauts/special character issue in lua gettext

master
BlockMen 2013-08-18 23:30:30 +02:00 committed by PilzAdam
parent deaa8dc287
commit 78ea818aaf
1 changed files with 2 additions and 3 deletions

View File

@ -979,9 +979,8 @@ int ModApiMainMenu::l_download_file(lua_State *L)
/******************************************************************************/
int ModApiMainMenu::l_gettext(lua_State *L)
{
const char* str = luaL_checkstring(L, 1);
str = gettext(str);
lua_pushstring(L, str);
std::wstring wtext = wstrgettext((std::string) luaL_checkstring(L, 1));
lua_pushstring(L, wide_to_narrow(wtext).c_str());
return 1;
}