static char *
command__js_utf8(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
{
    JS_SetCStringsAreUTF8();

    if (JS_CStringsAreUTF8())
    {
        return NGX_CONF_OK;
    }
    else
    {
        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "couldn't set JS_CStringsAreUTF8()", &cmd->name);
        return NGX_CONF_ERROR;
    }
}
Exemple #2
0
static int
emonk_init()
{
    if(!JS_CStringsAreUTF8()) JS_SetCStringsAreUTF8();
    return 0;
}