From f1c9a1695d73722433b78f5eaec36057d08382fe Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Fri, 13 Apr 2007 02:28:29 +0000 Subject: [PATCH] Fixed loading of unicode paths in win32 Originally committed to SVN as r1070. --- aegisub/text_file_reader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aegisub/text_file_reader.cpp b/aegisub/text_file_reader.cpp index 87c60fa85..f1cd7e2aa 100644 --- a/aegisub/text_file_reader.cpp +++ b/aegisub/text_file_reader.cpp @@ -110,7 +110,7 @@ wxString TextFileReader::GetEncoding(const wxString _filename) { CloseHandle(ifile); #else ifstream ifile; - ifile.open(_filename.mb_str(wxConvLocal)); + ifile.open(wxFNCONV(_filename)); if (!ifile.is_open()) { return _T("unknown"); } @@ -279,7 +279,7 @@ void TextFileReader::Open() { throw _T("Failed opening file for reading."); } #else - file.open(filename.mb_str(wxConvLocal),std::ios::in | std::ios::binary); + file.open(wxFNCONV(filename),std::ios::in | std::ios::binary); if (!file.is_open()) { throw _T("Failed opening file for reading."); }