Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031589Community[OCCT] OCCT:Data Exchangepublic2020-06-02 17:082020-10-31 09:20
Assigned Torobertlipman 
PlatformOSOS Version
Product Version[OCCT] 7.2.0 
Target Version[OCCT] 7.5.0Fixed in Version 
Summary0031589: Data Exchange - unable to read STEP file containing mangled characters
DescriptionI downloaded a STEP file from GrabCAD and CAD Assistant. The STEP file can be downloaded from [^]

Some of the text strings have characters that are not correctly encoded. For example, in the FILE_NAME in the header section, # 98, # 625, and more. There is even a note in the HEADER section indicating that the \X\ encoding is not used.

Although the characters do not correctly use Unicode characters, CAD Assistant should be able to handle them in some way. Every other viewer that I have tried does not have any problem with those characters.
Steps To ReproduceImport the STEP file available at [^] and test with CAD Assistant.
TagsNo tags attached.
Test case numberbugs step bug30397
Attached Files

- Relationships
related to 0031670verifiedbugmaster Community Data Exchange - cp1251 Cyrillic characters in STEP file 

-  Notes
abv (manager)
2020-10-06 22:33

This works for me on current master; Dmitry, can you check this please and see whether we need to add a test case for this issue?
dpasukhi (developer)
2020-10-21 11:08

Dear bugmaster,
please close the issue.
The current bug case has been fixed with #30397, so its test case is enough for check read unsupported symbol.
abv (manager)
2020-10-23 08:58
edited on: 2020-10-23 08:58

Hello Robert,

We have improved OCCT to handle different types of character encodings possible in STEP files. You can try this on beta version of OCCT 7.5.0 (see [^]).

One point to note is that STEP file normally is expected to contain strings in UTF-8 encoding (or old \X* control directives), which is not the case for the file you mentioned in the issue description. In order to read correctly strings within this kind of files (written using 8-bit encoding in some - unknown in general case! - code page), you will need to specify explicitly what encoding is to be used. This is now possible with Interface_Static parameter read.step.codepage.

If this parameter is set to "CP1252", then we can successfully read names of entities encoded using CP1252 encoding, such as

# 625=NEXT_ASSEMBLY_USAGE_OCCURRENCE('szíj_elsõ_feszített',

However, some of the test strings in that file seem to be completely broken and cannot be converted into anything sensible. In particular, the first entity you mentioned:


You wrote that "Every other viewer that I have tried does not have any problem with those characters.". Does this mean that these viewers are able to show this string as some reasonable text? If so, could you please give examples of what viewers you have used, and this text is displayed (snapshots would be OK)?

Thank you in advance!


robertlipman (reporter)
2020-10-26 21:07
edited on: 2020-10-26 21:33

There are three free viewers that I test STEP files with, C3D Viewer, Solidworks eDrawings Viewer, and VariCAD. Links to all of them are on [^]

eDrawings does not show the correct characters. C3D viewer does show the correct characters but I haven't check that closely. I don't know how to see the characters in VariCAD.

At least CAD Assistant shouldn't crash with this file.

Here's another file with cyrillic characters to test. [^]

robertlipman (reporter)
2020-10-26 21:08

I forwarded the information about the beta version to my developer. Hopefully, he can test it out soon.
abv (manager)
2020-10-31 09:19

I have checked the original file with C3D viewer:
- it does not show names of solids, thus name of entity #98 cannot be seen there
- it loads all texts as if they were in CP1251, even if the file is saved in UTF-8
- it does not support characters encoded using STEP control directives except \X2\
Thus it cannot be used as reference for correct reading of characters from STEP.

I consider now this issue as verified, please comment if you find any issues on the subject (or create separate issue).

- Related Changesets
occt: master e0a25f3d
Timestamp: 2020-09-09 10:02:39
Author: abv
Committer: abv
Details ] Diff ]
0030397: Data Exchange - STEP Reader extension to support entities which have a text description field with not supported symbols

STEP file is now opened in binary mode (instead of text mode) to avoid unexpected handling of control symbols inside string constants.
mod - src/StepFile/stepread.c Diff ] File ]
add - tests/bugs/step/bug30397 Diff ] File ]

- Issue History
Date Modified Username Field Change
2020-06-02 17:08 robertlipman New Issue
2020-06-02 17:08 robertlipman Assigned To => gka
2020-06-04 14:29 kgv Summary CAD Assistant will not read STEP file => Data Exchange - CAD Assistant will not read STEP file
2020-06-04 14:29 kgv Description Updated View Revisions
2020-06-04 14:40 kgv Relationship added related to 0030397
2020-06-04 14:45 kgv Product Version => 7.2.0
2020-06-04 14:45 kgv Target Version => 7.5.0
2020-06-04 14:45 kgv Summary Data Exchange - CAD Assistant will not read STEP file => Data Exchange - unable to read STEP file containing mangled characters
2020-07-16 23:17 robertlipman Assigned To gka => robertlipman
2020-07-16 23:59 robertlipman Assigned To robertlipman => gka
2020-07-24 13:03 kgv Relationship added related to 0031670
2020-09-10 13:21 abv Relationship added related to 0030848
2020-09-11 17:23 gka Target Version 7.5.0 => 7.6.0*
2020-10-06 22:33 abv Note Added: 0095767
2020-10-06 22:33 abv Assigned To gka => dpasukhi
2020-10-06 22:33 abv Status new => assigned
2020-10-06 22:33 abv Target Version 7.6.0* => 7.5.0
2020-10-21 11:08 dpasukhi Note Added: 0096094
2020-10-21 11:08 dpasukhi Assigned To dpasukhi => bugmaster
2020-10-21 11:08 dpasukhi Status assigned => feedback
2020-10-21 12:30 abv Changeset attached => occt master e0a25f3d
2020-10-21 12:31 abv Test case number => bugs step bug30397
2020-10-21 12:32 abv Assigned To bugmaster => abv
2020-10-23 08:29 abv Assigned To abv => robertlipman
2020-10-23 08:58 abv Note Added: 0096160
2020-10-23 08:58 abv Note Edited: 0096160 View Revisions
2020-10-26 21:07 robertlipman Note Added: 0096281
2020-10-26 21:08 robertlipman Note Added: 0096282
2020-10-26 21:33 robertlipman Note Edited: 0096281 View Revisions
2020-10-31 09:19 abv Note Added: 0096417
2020-10-31 09:20 abv Status feedback => verified
2020-10-31 09:20 abv Resolution open => fixed

Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker