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

0031851: Data Exchange, STEP - enable Unicode symbols in STEP export

Class STEPCAFControl_Writer is corrected to avoid replacing non-Ascii symbols by question marks, and spaces by underscores, on export to STEP.

Related: DRAW commands dealing with strings in OCAF documents are corrected to pass Unicode symbols as UTF-8.

Off-topic: code saving names of external STEP files in XDE and fetching them back is corrected to preserve Unicode symbols as UTF-8.

Added test bugs xde bug31851

Test de step_4 E7 corrected (no more replacement of spaces by underscores in names of layers)
This commit is contained in:
abv
2020-10-14 09:14:04 +03:00
committed by bugmaster
parent 870ae593c3
commit ae9f4b64ca
14 changed files with 62 additions and 79 deletions

View File

@@ -131,7 +131,7 @@ TCollection_AsciiString DDF_Browser::OpenRoot() const
list.AssignCat("\"");
if (root.FindAttribute(TDataStd_Name::GetID(),name))
{
TCollection_AsciiString tmpStr(name->Get(),'?');
TCollection_AsciiString tmpStr(name->Get());
tmpStr.ChangeAll(' ','_');
list.AssignCat(tmpStr);
}
@@ -178,7 +178,7 @@ TCollection_AsciiString DDF_Browser::OpenLabel(const TDF_Label& aLab) const
list.AssignCat("\"");
if (itr.Value().FindAttribute(TDataStd_Name::GetID(),name))
{
TCollection_AsciiString tmpStr(name->Get(),'?');
TCollection_AsciiString tmpStr(name->Get());
tmpStr.ChangeAll(' ','_');
list.AssignCat(tmpStr);
}