X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FDriverSTL%2FDriverSTL_R_SMDS_Mesh.cxx;h=ca6f393b1cb41e8c26172e67f58d908d06d00e07;hb=b79f3c0765077420af47201c7f12b5654a6c04ed;hp=f1e1ea6ac7448e88fe4bb87138951043810e9eba;hpb=4c16067d4281f56bd07d3f92fb63fff9c0c1d169;p=modules%2Fsmesh.git diff --git a/src/DriverSTL/DriverSTL_R_SMDS_Mesh.cxx b/src/DriverSTL/DriverSTL_R_SMDS_Mesh.cxx index f1e1ea6ac..ca6f393b1 100644 --- a/src/DriverSTL/DriverSTL_R_SMDS_Mesh.cxx +++ b/src/DriverSTL/DriverSTL_R_SMDS_Mesh.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -238,7 +238,12 @@ Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::readAscii(SMESH_File& theFile) const theFile.close(); // Open the file - FILE* file = fopen( myFile.c_str(),"r"); +#if defined(WIN32) && defined(UNICODE) + std::wstring aFile = Kernel_Utils::utf8_decode_s(myFile); + FILE* file = _wfopen( aFile.c_str(), L"r"); +#else + FILE* file = fopen(myFile.c_str(), "r"); +#endif // count the number of lines Standard_Integer nbLines = 0;