From 130fd387eaa77dae8b4ede2c188eae2c13a917cb Mon Sep 17 00:00:00 2001 From: psi29a Date: Thu, 27 Apr 2023 12:24:22 +0000 Subject: [PATCH] make use of std::wstring_convert to replace boost::locale::conv::utf_to_utf --- apps/mwiniimporter/main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/mwiniimporter/main.cpp b/apps/mwiniimporter/main.cpp index d17d7e747a..0beb2b38cc 100644 --- a/apps/mwiniimporter/main.cpp +++ b/apps/mwiniimporter/main.cpp @@ -18,7 +18,8 @@ int main(int argc, char* argv[]) #else // Include on Windows only -#include +#include +#include class utf8argv { @@ -28,9 +29,11 @@ public: args.reserve(argc); argv = new const char*[argc]; + std::wstring_convert> converter; + for (int i = 0; i < argc; ++i) { - args.push_back(boost::locale::conv::utf_to_utf(wargv[i])); + args.push_back(converter.to_bytes(wargv[i])); argv[i] = args.back().c_str(); } } @@ -50,8 +53,6 @@ private: characters interface which presents UTF-16 encoding. The rest of OpenMW application stack assumes UTF-8 encoding, therefore this conversion. - - For boost::filesystem::path::imbue see components/files/windowspath.cpp */ int wmain(int argc, wchar_t* wargv[]) {