Skip to content

Commit 78ea818

Browse files
BlockMenPilzAdam
authored andcommittedAug 19, 2013
Fix umlauts/special character issue in lua gettext
1 parent deaa8dc commit 78ea818

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎src/script/lua_api/l_mainmenu.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -979,9 +979,8 @@ int ModApiMainMenu::l_download_file(lua_State *L)
979979
/******************************************************************************/
980980
int ModApiMainMenu::l_gettext(lua_State *L)
981981
{
982-
const char* str = luaL_checkstring(L, 1);
983-
str = gettext(str);
984-
lua_pushstring(L, str);
982+
std::wstring wtext = wstrgettext((std::string) luaL_checkstring(L, 1));
983+
lua_pushstring(L, wide_to_narrow(wtext).c_str());
985984

986985
return 1;
987986
}

0 commit comments

Comments
 (0)
Please sign in to comment.