1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +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

@@ -43,6 +43,7 @@
#include <OSD_File.hxx>
#include <OSD_Environment.hxx>
#include <OSD_OpenFile.hxx>
#define STORAGE_VERSION "STORAGE_VERSION: "
#define REFERENCE_COUNTER "REFERENCE_COUNTER: "
@@ -115,8 +116,7 @@ void XmlLDrivers_DocumentStorageDriver::Write
if (WriteToDomDocument (theDocument, anElement, theFileName) == Standard_False) {
// Write DOM_Document into XML file,
TCollection_AsciiString aFileName (theFileName, '?');
FILE * aFile = fopen(aFileName.ToCString(), "wt");
FILE * aFile = OSD_OpenFile(theFileName, "wt");
if (aFile) {
LDOM_XmlWriter aWriter (aFile);
@@ -129,7 +129,7 @@ void XmlLDrivers_DocumentStorageDriver::Write
SetIsError (Standard_True);
SetStoreStatus(PCDM_SS_WriteFailure);
TCollection_ExtendedString aMsg =
TCollection_ExtendedString("Error: the file ") + aFileName +
TCollection_ExtendedString("Error: the file ") + theFileName +
" cannot be opened for writing";
aMessageDriver -> Write (aMsg.ToExtString());
Standard_Failure::Raise("File cannot be opened for writing");