1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0022484: UNICODE characters support

Initial UNICODE (UFT-8) characters support for OCCT file operations

Fix for compilation errors and fix for StepFile (avoid objects in pure c code)

Fixes for set unicode symbols to OCAF and visualization
This commit is contained in:
pdn
2014-10-02 15:39:25 +04:00
committed by bugmaster
parent d3dfddaebc
commit d9ff84e8ea
34 changed files with 617 additions and 510 deletions

View File

@@ -120,7 +120,12 @@ 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

@@ -19,10 +19,11 @@
*/
/**
*/
# include <stdlib.h>
# include <stdio.h>
# include <string.h>
# include "recfile.ph"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "recfile.ph"
/* StepFile_Error.c
@@ -83,7 +84,13 @@ 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
if (newin == NULL) {
return NULL ;
} else {