1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +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:
pdn
2014-10-22 12:17:10 +04:00
committed by bugmaster
parent 2caff0b32f
commit 947085567f
27 changed files with 341 additions and 80 deletions

View File

@@ -122,12 +122,7 @@ Standard_Integer StepFile_Read
checkread->Clear();
recfile_modeprint ( (modepr > 0 ? modepr-1 : 0) );
#ifdef _WIN32
TCollection_ExtendedString aFileNameW(ficnom, Standard_True);
FILE* newin = stepread_setinput((char*)aFileNameW.ToExtString());
#else
FILE* newin = stepread_setinput(ficnom);
#endif
if (!newin) return -1;
#ifdef CHRONOMESURE
Standard_Integer n ;

View File

@@ -24,6 +24,7 @@
#include <stdio.h>
#include <string.h>
#include "recfile.ph"
#include <OSD_OpenFile.hxx>
/* StepFile_Error.c
@@ -84,13 +85,8 @@ FILE* stepread_setinput (char* nomfic)
{
FILE* newin ;
if (strlen(nomfic) == 0) return stepin ;
#ifdef _WIN32
// file name is treated as UTF-8 string
// nomfic is prepared UTF-8 string
newin = _wfopen((const wchar_t*)nomfic, L"r") ;
#else
newin = fopen(nomfic,"r") ;
#endif
newin = OSD_OpenFile(nomfic,"r");
if (newin == NULL) {
return NULL ;
} else {