X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d2e1ef1928b7a2a292a6a5b9bd6fa2402a0c6b0f..5391f772be01cefca80affdc87afbfb894b2976b:/src/common/ffile.cpp diff --git a/src/common/ffile.cpp b/src/common/ffile.cpp index f880a43134..4449ec42a2 100644 --- a/src/common/ffile.cpp +++ b/src/common/ffile.cpp @@ -56,7 +56,21 @@ bool wxFFile::Open(const wxChar *filename, const char *mode) { wxASSERT_MSG( !m_fp, _T("should close or detach the old file first") ); +#if wxUSE_UNICODE + char *tmp_fname; + size_t fname_len; + + fname_len = wxStrlen(filename)+1; + tmp_fname = new char[fname_len]; + wxWX2MB(tmp_fname, filename, fname_len); + + m_fp = fopen(tmp_fname, mode); + + delete tmp_fname; +#else m_fp = fopen(filename, mode); +#endif + if ( !m_fp ) {