0028353: Samples - IESample cannot write files to paths with special characters
[occt.git] / samples / qt / Common / src / MDIWindow.cxx
index ee3ced6..9f3d6ae 100755 (executable)
@@ -128,7 +128,9 @@ void MDIWindow::dump()
     if ( !QFileInfo( file ).completeSuffix().length() )
       file += QString( ".bmp" );
 
-    bool res = myView->dump( (Standard_CString)file.toLatin1().constData() );
+    const TCollection_AsciiString anUtf8Path (file.toUtf8().data());
+
+    bool res = myView->dump( anUtf8Path.ToCString() );
     QApplication::restoreOverrideCursor();                
     if ( !res )
     {