MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031851Open CASCADE[OCCT] OCCT:Data Exchangepublic2020-10-14 08:532020-10-17 13:31
Reporterabv 
Assigned Tobugmaster 
PrioritynormalSeverityfeature 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.5.0Fixed in Version 
Summary0031851: Data Exchange, STEP - enable Unicode symbols in STEP export
DescriptionCurrent version of OCCT converts any Unicode (non-Ascii) symbol to '?' when exporting strings (e.g. names of shapes in XDE document) to STEP.

This should be corrected - Unicode symbols should be written either in UTF-8 encoding (allowed by modern edition of STEP ISO10303-21, see e.g. http://www.steptools.com/stds/step/IS_final_p21e3.html [^]) or using legacy /X2/ or /X4/ control directives (see 0028454).

Note that this change will break a non-conformant but still usable approach possible now - use of local 8-bit encoding for strings.
Steps To Reproduce
pload XDE
ReadStep D [locate_data_file utf8.stp]
WriteStep D $imagedir/utf8_saved.stp
ReadStep T $imagedir/utf8_saved.stp

set arabic [GetName T 0:1:1:1]
if { $arabic != "\u0627\u0644\u0645\u062C\u0633\u0645" } {
   puts "Error: arabic symbols get lost"
}
Additional information
and documentation updates
To convert Unicode string to escaped representation, suitable for placing into pure Ascii Tcl script, online services can be used, for instance
https://www.freeformatter.com/java-dotnet-escape.html [^]
TagsNo tags attached.
Test case numberbugs/xde/bug31851
Attached Files? file icon utf8.stp (442,283 bytes) 2020-10-14 08:53

- Relationships
related to 0028454reviewedbugmaster Community Data Exchange, STEP reader - names with special characters cannot be read 
child of 0022484closedbugmaster Open CASCADE UNICODE characters support. 

-  Notes
(0095946)
git (administrator)
2020-10-14 09:11

Branch CR31851 has been created by abv.

SHA-1: 760bb85212c6761ee065667df4c17b11062c58e3


Detailed log of new commits:

Author: abv
Date: Wed Oct 14 09:14:04 2020 +0300

    0031851: Data Exchange, STEP - enable Unicode symbols in STEP export
    
    Class STEPCAFControl_Writer is corrected to avoid replacing non-Ascii symbols by question marks 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
(0095950)
kgv (developer)
2020-10-14 09:46

Could you please remove redundant .ToCString() / .ToExtString() calls around affected lines?
(0095953)
git (administrator)
2020-10-14 10:00

Branch CR31851 has been updated by abv.

SHA-1: 712730c1ea3f5c8956d311a6d0deee7a19214ccc


Detailed log of new commits:

Author: abv
Date: Wed Oct 14 10:03:48 2020 +0300

    # review remarks

(0095957)
git (administrator)
2020-10-14 12:16

Branch CR31851 has been updated by abv.

SHA-1: a453c85574f19fa2f3b337bcbff3ce109de0a34b


Detailed log of new commits:

Author: abv
Date: Wed Oct 14 12:17:18 2020 +0300

    Test de step_4 E7 corrected (no more replacement of spaces by underscores in names of layers)
    
    On previous commit:
    Related: avoid replacing spaces by underscores in strings on reading from STEP.

(0095958)
git (administrator)
2020-10-14 12:18

Branch CR31851_1 has been created by abv.

SHA-1: 5847fc2de29ea225f646b7ed84a924315655e846


Detailed log of new commits:

Author: abv
Date: Wed Oct 14 09:14:04 2020 +0300

    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)
(0095977)
abv (manager)
2020-10-14 15:39

Fix is pushed to branch CR31851 and tested; see Jenkins job CR31851-abv; please review
(0095978)
gka (developer)
2020-10-14 15:42

Branch CR31851_1 was reviewed
(0096035)
bugmaster (administrator)
2020-10-17 13:22

Combination -
OCCT branch : IR-2020-10-16
master SHA - ae9f4b64cacf0df612944b3694a3bdfa5f1f29cf
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-10-16 SHA - fcb5abe005e152f7f923f4cf6c02acb07c027cdc
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18027.820000000127 / 18057.130000000117 [-0.16%]
Products
Total CPU difference: 12174.330000000093 / 12182.170000000115 [-0.06%]
Windows-64-VC14:
OCCT
Total CPU difference: 19740.03125 / 19746.828125 [-0.03%]
Products
Total CPU difference: 13564.71875 / 13586.625 [-0.16%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

- Related Changesets
occt: master ae9f4b64
Timestamp: 2020-10-14 06:14:04
Author: abv
Committer: bugmaster
Details ] Diff ]
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)
mod - src/DDataStd/DDataStd_BasicCommands.cxx Diff ] File ]
mod - src/DDataStd/DDataStd_NameCommands.cxx Diff ] File ]
mod - src/DDataStd/DDataStd_TreeBrowser.cxx Diff ] File ]
mod - src/DDF/DDF_Browser.cxx Diff ] File ]
mod - src/DDocStd/DDocStd_ApplicationCommands.cxx Diff ] File ]
mod - src/DDocStd/DDocStd_DocumentCommands.cxx Diff ] File ]
mod - src/DDocStd/DDocStd_MTMCommands.cxx Diff ] File ]
mod - src/STEPCAFControl/STEPCAFControl_Writer.cxx Diff ] File ]
mod - src/XCAFDoc/XCAFDoc_ShapeTool.cxx Diff ] File ]
mod - src/XDEDRAW/XDEDRAW.cxx Diff ] File ]
mod - src/XDEDRAW/XDEDRAW_Layers.cxx Diff ] File ]
mod - src/XDEDRAW/XDEDRAW_Props.cxx Diff ] File ]
add - tests/bugs/xde/bug31851 Diff ] File ]
mod - tests/de/step_4/E7 Diff ] File ]

- Issue History
Date Modified Username Field Change
2020-10-14 08:53 abv New Issue
2020-10-14 08:53 abv Assigned To => gka
2020-10-14 08:53 abv File Added: utf8.stp
2020-10-14 08:54 abv Assigned To gka => abv
2020-10-14 08:54 abv Target Version 7.6.0* => 7.5.0
2020-10-14 08:54 abv Relationship added related to 0028454
2020-10-14 08:56 abv Additional Information Updated View Revisions
2020-10-14 09:11 git Note Added: 0095946
2020-10-14 09:14 kgv Steps to Reproduce Updated View Revisions
2020-10-14 09:31 kgv Relationship added child of 0022484
2020-10-14 09:46 kgv Note Added: 0095950
2020-10-14 10:00 git Note Added: 0095953
2020-10-14 12:14 kgv Severity minor => feature
2020-10-14 12:16 git Note Added: 0095957
2020-10-14 12:18 git Note Added: 0095958
2020-10-14 15:39 abv Note Added: 0095977
2020-10-14 15:39 abv Assigned To abv => gka
2020-10-14 15:39 abv Status new => resolved
2020-10-14 15:42 gka Note Added: 0095978
2020-10-14 15:42 gka Assigned To gka => bugmaster
2020-10-14 15:42 gka Status resolved => reviewed
2020-10-15 08:24 abv Relationship added related to 0030694
2020-10-17 13:22 bugmaster Note Added: 0096035
2020-10-17 13:22 bugmaster Status reviewed => tested
2020-10-17 13:31 bugmaster Test case number => bugs/xde/bug31851
2020-10-17 13:31 bugmaster Changeset attached => occt master ae9f4b64
2020-10-17 13:31 bugmaster Status tested => verified
2020-10-17 13:31 bugmaster Resolution open => fixed


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker