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

@@ -2606,23 +2606,7 @@ static int VDrawText (Draw_Interpretor& di, Standard_Integer argc, const char**
const Standard_Boolean isMultibyte = (argc < 16)? Standard_False : (Draw::Atoi(argv[15]) != 0);
// Read text string
TCollection_ExtendedString name;
if (isMultibyte)
{
const char *str = argv[1];
while ( *str || *(str+1)=='\x0A' || *(str+1)=='\x0B' || *(str+1)=='\x0C' || *(str+1)=='\x0D'
|| *(str+1)=='\x07' || *(str+1)=='\x08' || *(str+1)=='\x09' )
{
unsigned short c1 = *str++;
unsigned short c2 = *str++;
if (!c2) break;
name += (Standard_ExtCharacter)((c1 << 8) | c2);
}
}
else
{
name += argv[1];
}
TCollection_ExtendedString name(argv[1],isMultibyte);
if (name.Length())
{