#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <Standard_Mutex.hxx>
+#include <OSD_OpenFile.hxx>
#include <stdlib.h>
#include <stdio.h>
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