mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0025367: IGES and BRep persistence - support unicode file names on Windows
OSD_OpenFile.hxx header is created for using in file open operations with Unicode names. Fix for STEP files reading. Adding test cases for issue 25367 Update test case for issue 25364 Update test cases due to improvements
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TCollection_ExtendedString.hxx>
|
||||
#include <Standard_Mutex.hxx>
|
||||
#include <OSD_OpenFile.hxx>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -214,13 +215,7 @@ Standard_Boolean Message_MsgFile::LoadFile (const Standard_CString theFileName)
|
||||
if (theFileName == NULL || * theFileName == '\0') return Standard_False;
|
||||
|
||||
// Open the file
|
||||
#ifdef _WIN32
|
||||
// file name is treated as UTF-8 string
|
||||
TCollection_ExtendedString aFileNameW(theFileName, Standard_True);
|
||||
FILE *anMsgFile = _wfopen ((const wchar_t*)aFileNameW.ToExtString(), L"rb");
|
||||
#else
|
||||
FILE *anMsgFile = fopen (theFileName, "rb");
|
||||
#endif
|
||||
FILE *anMsgFile = OSD_OpenFile(theFileName,"rb");
|
||||
if (!anMsgFile) return Standard_False;
|
||||
|
||||
// Read the file into memory
|
||||
|
Reference in New Issue
Block a user