diff --git a/src/main.cpp b/src/main.cpp index 28595d7..ab82cb2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,6 +25,13 @@ #include "SaveTool/SaveTool.h" int main(int argc, char** argv) { + auto str = std::setlocale(LC_ALL, ".utf-8"); + if(str && !Containers::StringView{str}.hasSuffix(".utf8")) { + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", + "Your system doesn't support UTF-8.", nullptr); + return EXIT_FAILURE; + } + #ifndef SAVETOOL_DEBUG_BUILD std::ofstream output{"SaveToolLog.txt", std::ios::trunc|std::ios::out};