/* utf8len(s ]) --> number of characters that start in the range , or nil + current position if 's' is not well formed in that interval  */
static int utflen(lua_State *L)
/* utf8len(s ]) --> number of characters that start in the range , or nil + current position if 's' is not well formed in that interval  */
static int utflen(lua_State *L)
{
    const char *s1 = utf8_decode(s + posi, NULL);
    if (s1 == NULL) {
      lua_pushnil(L);
      lua_pushinteger(L, posi + 1);
      return 2;
    }
    posi = s1 - s;
    n++;
  }
  lua_pushinteger(L, n);
  return 1;
}