msgTitle = wxString(_("File error"));
#if wxUSE_STD_IOSTREAM
- wxSTD ofstream store(file.mb_str());
+ wxSTD ofstream store(file.mb_str(), wxSTD ios::binary);
if (store.fail() || store.bad())
#else
wxFileOutputStream store(file);
bool wxDocument::DoOpenDocument(const wxString& file)
{
#if wxUSE_STD_IOSTREAM
- wxSTD ifstream store(file.mb_str());
+ wxSTD ifstream store(file.mb_str(), wxSTD ios::binary);
if (!store.fail() && !store.bad())
#else
wxFileInputStream store(file);
pathInMenu = m_fileHistory[i];
}
+ // we need to quote '&' characters which are used for mnemonics
+ pathInMenu.Replace(_T("&"), _T("&&"));
wxString buf;
buf.Printf(s_MRUEntryFormat, i + 1, pathInMenu.c_str());
wxList::compatibility_iterator node = m_fileMenus.GetFirst();