Index: frm/frmQuery.cpp =================================================================== --- frm/frmQuery.cpp (revision 8227) +++ frm/frmQuery.cpp (working copy) @@ -1451,7 +1451,8 @@ wxUtfFile file(lastPath, wxFile::read, modeUnicode ? wxFONTENCODING_UTF8:wxFONTENCODING_DEFAULT); if (file.IsOpened()) - file.Read(str); + if (file.Read(str) == (size_t)-1) + wxLogWarning(_("The selected file could not be opened because it contains characters that are not valid UTF-8. Please try again with the 'Read and write Unicode ITF-8 files' option turned off.")); if (!str.IsEmpty()) {