diff --git a/lua.cpp b/lua.cpp index b3f7443..f1adb5c 100644 --- a/lua.cpp +++ b/lua.cpp @@ -564,7 +564,7 @@ extern "C" { } static int cpp_strlen(lua_State *L) { const char* str = luaL_checkstring(L, 1); - lua_pushinteger(L, strlen(str)); + lua_pushinteger(L, utfstrlen(str)); return 1; }