mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-15 13:48:57 +08: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:
@@ -166,7 +166,7 @@ Message_Msg& Message_Msg::Arg (const Standard_CString theString)
|
||||
// print string according to format
|
||||
char * sStringBuffer = new char [Max ((Standard_Integer)strlen(theString)+1, 1024)];
|
||||
Sprintf (sStringBuffer, aFormat.ToCString(), theString);
|
||||
TCollection_ExtendedString aStr ( sStringBuffer );
|
||||
TCollection_ExtendedString aStr ( sStringBuffer, Standard_True );
|
||||
delete [] sStringBuffer;
|
||||
sStringBuffer = 0;
|
||||
|
||||
|
||||
@@ -214,7 +214,13 @@ 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
|
||||
if (!anMsgFile) return Standard_False;
|
||||
|
||||
// Read the file into memory
|
||||
|
||||
Reference in New Issue
Block a user