projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
deaa8dc
)
Fix umlauts/special character issue in lua gettext
author
BlockMen
<nmuelll@web.de>
Sun, 18 Aug 2013 21:30:30 +0000
(23:30 +0200)
committer
PilzAdam
<pilzadam@minetest.net>
Mon, 19 Aug 2013 20:23:41 +0000
(22:23 +0200)
src/script/lua_api/l_mainmenu.cpp
patch
|
blob
|
history
diff --git
a/src/script/lua_api/l_mainmenu.cpp
b/src/script/lua_api/l_mainmenu.cpp
index 6417d1e183b15986ec4daa9b932372f0bafefd85..55376690eda01c68e6a0acd845cf6e5eaa1c9ddb 100644
(file)
--- a/
src/script/lua_api/l_mainmenu.cpp
+++ b/
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;
}