From baaf26111676270c5044ed88523e4f967664c6aa Mon Sep 17 00:00:00 2001 From: ebbit1q Date: Sun, 27 Feb 2022 22:33:36 +0100 Subject: [PATCH] use utf8 instead of the system encoding (#4582) * use utf8 instead of the system preference * found another toLocal8Bit --- cockatrice/src/filter_string.cpp | 2 +- common/expression.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/filter_string.cpp b/cockatrice/src/filter_string.cpp index 1c1d2787..63758371 100644 --- a/cockatrice/src/filter_string.cpp +++ b/cockatrice/src/filter_string.cpp @@ -337,7 +337,7 @@ static void setupParserRules() FilterString::FilterString(const QString &expr) { - QByteArray ba = expr.simplified().toLocal8Bit(); + QByteArray ba = expr.simplified().toUtf8(); std::call_once(init, setupParserRules); diff --git a/common/expression.cpp b/common/expression.cpp index 0bb1f5ee..370a3864 100644 --- a/common/expression.cpp +++ b/common/expression.cpp @@ -95,7 +95,7 @@ double Expression::eval(const peg::Ast &ast) double Expression::parse(const QString &expr) { - QByteArray ba = expr.toLocal8Bit(); + QByteArray ba = expr.toUtf8(); math.enable_ast();