re.append("\\E)(?C)");
}
+static
+bool isUtf8(const CompiledPcre &compiled) {
+ unsigned long int options = 0;
+ pcre_fullinfo(compiled.bytecode, NULL, PCRE_INFO_OPTIONS, &options);
+ return options & PCRE_UTF8;
+}
+
unique_ptr<CompiledPcre>
GroundTruth::compile(unsigned id, bool no_callouts) {
bool highlander = false;
throw PcreCompileFailure(oss.str());
}
+ compiled->utf8 |= isUtf8(*compiled);
+
return compiled;
}
return ret;
}
-static
-bool isUtf8(const CompiledPcre &compiled) {
- unsigned long int options = 0;
- pcre_fullinfo(compiled.bytecode, NULL, PCRE_INFO_OPTIONS, &options);
- return options & PCRE_UTF8;
-}
-
static
CaptureVec makeCaptureVec(const vector<int> &ovector, int ret) {
assert(ret > 0);