summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/common/file_util.h2
-rw-r--r--src/common/string_util.h18
2 files changed, 1 insertions, 19 deletions
diff --git a/src/common/file_util.h b/src/common/file_util.h
index 3d8fe6264..571503d2a 100644
--- a/src/common/file_util.h
+++ b/src/common/file_util.h
@@ -285,7 +285,7 @@ private:
285template <typename T> 285template <typename T>
286void OpenFStream(T& fstream, const std::string& filename, std::ios_base::openmode openmode) { 286void OpenFStream(T& fstream, const std::string& filename, std::ios_base::openmode openmode) {
287#ifdef _MSC_VER 287#ifdef _MSC_VER
288 fstream.open(Common::UTF8ToTStr(filename).c_str(), openmode); 288 fstream.open(Common::UTF8ToUTF16W(filename).c_str(), openmode);
289#else 289#else
290 fstream.open(filename.c_str(), openmode); 290 fstream.open(filename.c_str(), openmode);
291#endif 291#endif
diff --git a/src/common/string_util.h b/src/common/string_util.h
index 78b558405..32bf6a19c 100644
--- a/src/common/string_util.h
+++ b/src/common/string_util.h
@@ -76,24 +76,6 @@ std::u16string UTF8ToUTF16(const std::string& input);
76std::string UTF16ToUTF8(const std::wstring& input); 76std::string UTF16ToUTF8(const std::wstring& input);
77std::wstring UTF8ToUTF16W(const std::string& str); 77std::wstring UTF8ToUTF16W(const std::string& str);
78 78
79#ifdef _UNICODE
80inline std::string TStrToUTF8(const std::wstring& str) {
81 return UTF16ToUTF8(str);
82}
83
84inline std::wstring UTF8ToTStr(const std::string& str) {
85 return UTF8ToUTF16W(str);
86}
87#else
88inline std::string TStrToUTF8(const std::string& str) {
89 return str;
90}
91
92inline std::string UTF8ToTStr(const std::string& str) {
93 return str;
94}
95#endif
96
97#endif 79#endif
98 80
99/** 81/**