Fixed loading of unicode paths in win32
Originally committed to SVN as r1070.
This commit is contained in:
parent
f8a711a0db
commit
f1c9a1695d
1 changed files with 2 additions and 2 deletions
|
@ -110,7 +110,7 @@ wxString TextFileReader::GetEncoding(const wxString _filename) {
|
||||||
CloseHandle(ifile);
|
CloseHandle(ifile);
|
||||||
#else
|
#else
|
||||||
ifstream ifile;
|
ifstream ifile;
|
||||||
ifile.open(_filename.mb_str(wxConvLocal));
|
ifile.open(wxFNCONV(_filename));
|
||||||
if (!ifile.is_open()) {
|
if (!ifile.is_open()) {
|
||||||
return _T("unknown");
|
return _T("unknown");
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,7 @@ void TextFileReader::Open() {
|
||||||
throw _T("Failed opening file for reading.");
|
throw _T("Failed opening file for reading.");
|
||||||
}
|
}
|
||||||
#else
|
#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()) {
|
if (!file.is_open()) {
|
||||||
throw _T("Failed opening file for reading.");
|
throw _T("Failed opening file for reading.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue