Fixed loading of unicode paths in win32

Originally committed to SVN as r1070.
This commit is contained in:
Rodrigo Braz Monteiro 2007-04-13 02:28:29 +00:00
parent f8a711a0db
commit f1c9a1695d
1 changed files with 2 additions and 2 deletions

View File

@ -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.");
}