X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FViewerTest%2FViewerTest_ObjectCommands.cxx;h=222e88d58e97c1d1bc6217618bf525dab2d2ae67;hb=d9ff84e8ea0ebabf4c8a5e0ce4f38d7ee02040e2;hpb=d3dfddaebcf0ff7acbcdae1d55d0584f8490018b diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index 25b1b91e53..222e88d58e 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -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()) {