diff --git a/src/common/file_util.h b/src/common/file_util.h index 4b04edb3e..878fbfedc 100644 --- a/src/common/file_util.h +++ b/src/common/file_util.h @@ -264,7 +264,7 @@ private: template void OpenFStream(T& fstream, const std::string& filename, std::ios_base::openmode openmode) { #ifdef _MSC_VER - fstream.open(Common::UTF8ToTStr(filename).c_str(), openmode); + fstream.open(Common::UTF8ToUTF16W(filename).c_str(), openmode); #else fstream.open(filename.c_str(), openmode); #endif diff --git a/src/common/string_util.h b/src/common/string_util.h index 20a0ceb19..091735d5f 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h @@ -74,24 +74,6 @@ std::u16string UTF8ToUTF16(const std::string& input); std::string UTF16ToUTF8(const std::wstring& input); std::wstring UTF8ToUTF16W(const std::string& str); -#ifdef _UNICODE -inline std::string TStrToUTF8(const std::wstring& str) { - return UTF16ToUTF8(str); -} - -inline std::wstring UTF8ToTStr(const std::string& str) { - return UTF8ToUTF16W(str); -} -#else -inline std::string TStrToUTF8(const std::string& str) { - return str; -} - -inline std::string UTF8ToTStr(const std::string& str) { - return str; -} -#endif - #endif /**