diff --git a/src/utils/xstring.cpp b/src/utils/xstring.cpp index c4e23643..04ee8e4f 100644 --- a/src/utils/xstring.cpp +++ b/src/utils/xstring.cpp @@ -679,7 +679,11 @@ namespace UtfConverter //convert a std::string to std::wstring std::wstring mbstowcs(std::string str) { - return UtfConverter::FromUtf8(str); + try { + return UtfConverter::FromUtf8(str); + } catch(std::exception) { + return L"(failed UTF-8 conversion)"; + } } std::string wcstombs(std::wstring str)