diff options
| author | Weiyi Wang <wwylele@gmail.com> | 2018-09-22 00:52:38 -0400 |
|---|---|---|
| committer | fearlessTobi <thm.frey@gmail.com> | 2018-10-02 16:10:20 +0200 |
| commit | bfe84f06f2de966b68026f5b3f4212fd2ba783b6 (patch) | |
| tree | a5d3e6cbcfd520fde820edf83fbace8c174e9818 /src/common/file_util.h | |
| parent | a4595bb93947c849c8101cac6de29f9f694f26b1 (diff) | |
string_util: remove TString conversion for windows
First of all they are foundamentally broken. As our convention is that std::string is always UTF-8, these functions assume that the multi-byte character version of TString (std::string) from windows is also in UTF-8, which is almost always wrong. We are not going to build multi-byte character build, and even if we do, this dirty work should be handled by frontend framework early.
Diffstat (limited to 'src/common/file_util.h')
| -rw-r--r-- | src/common/file_util.h | 2 |
1 files changed, 1 insertions, 1 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: template <typename T> 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 |
