Salome HOME
Run SALOME with UNICODE path.
[modules/gui.git] / src / VTKViewer / VTKViewer_OpenGLHelper.cxx
index dec97b0ee14863e37fcfd5bb6be9313518e9cbaf..fe9ae203a6881aca677671e805c9c477654ca512 100644 (file)
@@ -22,6 +22,7 @@
 
 
 #include "VTKViewer_OpenGLHelper.h"
+#include <Basics_Utils.hxx>
 
 #ifndef WIN32
 # ifndef GLX_GLXEXT_LEGACY
@@ -219,8 +220,12 @@ namespace GUI_OPENGL
 {
        char* readFromFile( std::string fileName )
        {
+#if defined(WIN32) && defined(UNICODE)
+         const wchar_t* wFileName = Kernel_Utils::utf8_decode( fileName.c_str() );
+         FILE* file = _wfopen( wFileName, L"r" );
+#else
          FILE* file = fopen( fileName.c_str(), "r" );
-
+#endif
          char* content = NULL;
          int count = 0;