Skip to content
Permalink
Browse files

Fix umlauts/special character issue in lua gettext

  • Loading branch information
BlockMen authored and PilzAdam committed Aug 19, 2013
1 parent deaa8dc commit 78ea818aaf398e5eec4f1da7c302d3082aaf7f3c
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/script/lua_api/l_mainmenu.cpp
@@ -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;
}

0 comments on commit 78ea818

Please sign in to comment.