diff --git a/src/math/pievaluator.cpp b/src/math/pievaluator.cpp index f694486d..f116ea24 100755 --- a/src/math/pievaluator.cpp +++ b/src/math/pievaluator.cpp @@ -309,15 +309,20 @@ void PIEvaluator::replaceOperators() { currentString.replaceAll("<=", "{"); currentString.replaceAll("&&", "&"); currentString.replaceAll("||", "|"); + currentString.replaceAll(PIString::fromUTF8("≠"), ":"); + currentString.replaceAll(PIString::fromUTF8("≥"), "}"); + currentString.replaceAll(PIString::fromUTF8("≤"), "{"); + currentString.replaceAll(PIString::fromUTF8("⋀"), "&"); + currentString.replaceAll(PIString::fromUTF8("⋁"), "|"); } void PIEvaluator::makeOutput(PIString & string) { - string.replaceAll(":", "≠"); - string.replaceAll("}", "≥"); - string.replaceAll("{", "≤"); - string.replaceAll("&", "⋀"); - string.replaceAll("|", "⋁"); + string.replaceAll(":", PIString::fromUTF8("≠")); + string.replaceAll("}", PIString::fromUTF8("≥")); + string.replaceAll("{", PIString::fromUTF8("≤")); + string.replaceAll("&", PIString::fromUTF8("⋀")); + string.replaceAll("|", PIString::fromUTF8("⋁")); } @@ -984,13 +989,13 @@ PIString PIEvaluator::operationChar(const PIEvaluatorTypes::Operation & operatio case PIEvaluatorTypes::oPower: return "^"; case PIEvaluatorTypes::oResidue: return "%"; case PIEvaluatorTypes::oEqual: return "="; - case PIEvaluatorTypes::oNotEqual: return ("≠"); - case PIEvaluatorTypes::oGreaterEqual: return ("≥"); - case PIEvaluatorTypes::oSmallerEqual: return ("≤"); + case PIEvaluatorTypes::oNotEqual: return PIString::fromUTF8("≠"); + case PIEvaluatorTypes::oGreaterEqual: return PIString::fromUTF8("≥"); + case PIEvaluatorTypes::oSmallerEqual: return PIString::fromUTF8("≤"); case PIEvaluatorTypes::oGreater: return ">"; case PIEvaluatorTypes::oSmaller: return "<"; - case PIEvaluatorTypes::oAnd: return ("⋀"); - case PIEvaluatorTypes::oOr: return ("⋁"); + case PIEvaluatorTypes::oAnd: return PIString::fromUTF8("⋀"); + case PIEvaluatorTypes::oOr: return PIString::fromUTF8("⋁"); default: return "???"; } } diff --git a/src/system/piprocess.cpp b/src/system/piprocess.cpp index 277bd6b5..6dd3f265 100755 --- a/src/system/piprocess.cpp +++ b/src/system/piprocess.cpp @@ -193,9 +193,14 @@ void PIProcess::startProc(bool detached) { void PIProcess::terminate() { #ifdef WINDOWS - if (is_exec) if (!TerminateProcess(pi.hProcess, 0)) return; pi.dwProcessId = 0; + if (is_exec) + if (!TerminateProcess(pi.hProcess, 0)) + return; + pi.dwProcessId = 0; #else - if (is_exec) kill(pid, SIGKILL); pid = 0; + if (is_exec) + kill(pid, SIGKILL); + pid = 0; #endif }