alliedmodders / sourcemod

SourceMod - Source Engine Scripting and Administration
http://www.sourcemod.net/
973 stars 422 forks source link

PCRE is not compiled with Unicode property support #1460

Closed JoinedSenses closed 3 years ago

JoinedSenses commented 3 years ago

Help us help you

Environment

Description

SM has regex flag for UCP but extension does not support it. PCRE is not compiled with Unicode property support

Problematic Code (or Steps to Reproduce)

Compile/run any regex expression with flag PCRE_UCP

Headline commented 3 years ago

What arch?

JoinedSenses commented 3 years ago

1.10.0.6492 ubuntu / debian

Tested by another user, not myself unfortunately. I dont have any machines with 1.11 to check right now either

JoinedSenses commented 3 years ago

I'll go ahead and upgrade to 1.11 on both win/linux to test

JoinedSenses commented 3 years ago

Closing because tested on 1.11 with no issue

public void OnPluginStart() {
    RegAdminCmd("sm_testregex", cmdTest, ADMFLAG_ROOT);
}

public Action cmdTest(int client, int args) {
    char err[256];
    RegexError re;
    Regex r = new Regex("asdf", PCRE_UCP, err, sizeof err, re);
    ReplyToCommand(client, "r:%i err:%s re:%i", r, err, re);
    delete r;
    return Plugin_Handled;
}

r:-121174664 err: re:0