git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33014 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
 #include "wx/intl.h"
 #include "wx/filename.h"
 #include "wx/msgdlg.h"
+#include "wx/log.h"
 
 #include <gtk/gtk.h>
 
     int style = dialog->GetStyle();
     gchar* text = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget));
     wxString filename(wxGTK_CONV_BACK(text));
+    if ( filename.empty() )
+    {
+        // this is totally lame but better than silent error
+        wxLogWarning(_("This filename can't be used by wxWidgets because it contains invalid UTF-8 characters, please rename the file."));
+        return;
+    }
 
     if ((style & wxSAVE) && (style & wxOVERWRITE_PROMPT))
     {
 
 #include "wx/intl.h"
 #include "wx/filename.h"
 #include "wx/msgdlg.h"
+#include "wx/log.h"
 
 #include <gtk/gtk.h>
 
     int style = dialog->GetStyle();
     gchar* text = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget));
     wxString filename(wxGTK_CONV_BACK(text));
+    if ( filename.empty() )
+    {
+        // this is totally lame but better than silent error
+        wxLogWarning(_("This filename can't be used by wxWidgets because it contains invalid UTF-8 characters, please rename the file."));
+        return;
+    }
 
     if ((style & wxSAVE) && (style & wxOVERWRITE_PROMPT))
     {