View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031851 | Open CASCADE | OCCT:Data Exchange | public | 2020-10-14 08:53 | 2020-12-02 17:13 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | feature | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.5.0 | Fixed in Version | 7.5.0 | ||
Summary | 0031851: Data Exchange, STEP - enable Unicode symbols in STEP export | ||||
Description | Current 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 | ||||
Tags | No tags attached. | ||||
Test case number | bugs/xde/bug31851 | ||||
2020-10-14 08:53 manager |
utf8.stp (442,283 bytes) |
|
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 |
|
Could you please remove redundant .ToCString() / .ToExtString() calls around affected lines? |
|
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 |
|
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. |
|
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) |
|
Fix is pushed to branch CR31851 and tested; see Jenkins job CR31851-abv; please review |
|
Branch CR31851_1 was reviewed |
|
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 |
|
Branch CR31851_1 has been deleted by inv. SHA-1: 5847fc2de29ea225f646b7ed84a924315655e846 |
|
Branch CR31851 has been deleted by inv. SHA-1: a453c85574f19fa2f3b337bcbff3ce109de0a34b |
occt: master ae9f4b64 2020-10-14 06:14:04
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) |
Affected Issues 0031851 |
|
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 |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-10-14 08:53 |
|
New Issue | |
2020-10-14 08:53 |
|
Assigned To | => gka |
2020-10-14 08:53 |
|
File Added: utf8.stp | |
2020-10-14 08:54 |
|
Assigned To | gka => abv |
2020-10-14 08:54 |
|
Target Version | 7.6.0 => 7.5.0 |
2020-10-14 08:54 |
|
Relationship added | related to 0028454 |
2020-10-14 08:56 |
|
Additional Information Updated | |
2020-10-14 09:11 | git | Note Added: 0095946 | |
2020-10-14 09:14 | kgv | Steps to Reproduce Updated | |
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 |
|
Note Added: 0095977 | |
2020-10-14 15:39 |
|
Assigned To | abv => gka |
2020-10-14 15:39 |
|
Status | new => resolved |
2020-10-14 15:42 |
|
Note Added: 0095978 | |
2020-10-14 15:42 |
|
Assigned To | gka => bugmaster |
2020-10-14 15:42 |
|
Status | resolved => reviewed |
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 |
2020-10-24 12:41 | git | Note Added: 0096222 | |
2020-10-24 12:41 | git | Note Added: 0096223 | |
2020-10-25 20:41 |
|
Relationship added | has duplicate 0031182 |
2020-12-02 16:22 |
|
Fixed in Version | => 7.5.0 |
2020-12-02 17:13 |
|
Status | verified => closed |