Skip to content

Commit

Permalink
disable UTF validation in PCRE2 (openvinotoolkit#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-esir authored Oct 21, 2024
1 parent 17fc3c1 commit 5737389
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ std::string PCRE2Wrapper::substitute(const std::string& orig_str,
m_compiled,
(PCRE2_SPTR) orig_str.c_str(), subject_length,
0,
0,
PCRE2_NO_UTF_CHECK,
match_data,
NULL
);
Expand All @@ -301,7 +301,7 @@ std::string PCRE2Wrapper::substitute(const std::string& orig_str,
m_compiled,
(PCRE2_SPTR) orig_str.c_str(), orig_str.size(),
0,
global_replace ? PCRE2_SUBSTITUTE_GLOBAL : 0,
(global_replace ? PCRE2_SUBSTITUTE_GLOBAL : 0) | PCRE2_NO_UTF_CHECK,
match_data,
NULL,
(PCRE2_SPTR) replace_pattern.data(), replace_pattern.size(),
Expand Down

0 comments on commit 5737389

Please sign in to comment.