From ac0b74cea0428e3470e59ea06f643743b5e51cc4 Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Fri, 17 Jan 2020 12:22:36 +0100 Subject: [PATCH] Fix regexp implementation to work with Unicode characters After switching from QRegExp to QRegularExpression matching Unicode characters was broken. This functionality is now restored. See issue #2054. --- src/sqlitedb.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sqlitedb.cpp b/src/sqlitedb.cpp index 1f1ce5a4..0128ba55 100644 --- a/src/sqlitedb.cpp +++ b/src/sqlitedb.cpp @@ -143,6 +143,7 @@ static void regexp(sqlite3_context* ctx, int /*argc*/, sqlite3_value* argv[]) { // Pattern is not in cache. Create a new regular expressions object, compile it, and insert it into the cache regex.setPattern(pattern); + regex.setPatternOptions(QRegularExpression::UseUnicodePropertiesOption); if(!regex.isValid()) return sqlite3_result_error(ctx, "invalid operand", -1); regex.optimize();