diff --git a/apps/openmw/mwgui/console.cpp b/apps/openmw/mwgui/console.cpp index 9be397f13a..7319e87d2d 100644 --- a/apps/openmw/mwgui/console.cpp +++ b/apps/openmw/mwgui/console.cpp @@ -1,5 +1,6 @@ #include "console.hpp" +#include #include #include #include @@ -13,6 +14,7 @@ #include #include #include +#include "components/misc/utf8stream.hpp" #include #include "../mwscript/extensions.hpp" @@ -27,8 +29,6 @@ #include "../mwworld/class.hpp" #include "../mwworld/esmstore.hpp" -#include - namespace MWGui { class ConsoleInterpreterContext : public MWScript::InterpreterContext @@ -389,7 +389,7 @@ namespace MWGui return; } - currentSearchTerm = searchTerm; + currentSearchTerm = Utf8Stream::lowerCaseUtf8(searchTerm); currentOccurrence = std::string::npos; findNextOccurrence(nullptr); @@ -402,7 +402,7 @@ namespace MWGui return; } - const auto historyText = mHistory->getOnlyText(); + const auto historyText = Utf8Stream::lowerCaseUtf8(mHistory->getOnlyText().asUTF8()); // Search starts at the beginning size_t startIndex = 0; @@ -440,7 +440,7 @@ namespace MWGui return; } - const auto historyText = mHistory->getOnlyText(); + const auto historyText = Utf8Stream::lowerCaseUtf8(mHistory->getOnlyText().asUTF8()); // Search starts at the end size_t startIndex = historyText.length();