View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0029069 | Community | OCCT:Samples | public | 2017-08-31 15:43 | 2018-06-29 21:19 |
Reporter | sgiesel | Assigned To | apn | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | PC | OS | Windows 7 | ||
Product Version | 7.1.0 | ||||
Target Version | 7.3.0 | Fixed in Version | 7.3.0 | ||
Summary | 0029069: Samples - handle UNICODE filenames within C++/CLI CSharp sample | ||||
Description | When loading a step file with special characters like ä,Ü,á,... OpenCascade will return with a failure. | ||||
Steps To Reproduce | 1. Rename a step file to for example Inválid.step 2. Try to open it with the STEPCAFControl_Reader::Perform() with the path to the invalid stepfile 3. It always returns false | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
I cannot reproduce the problem with the file named "InválidäÜá.stp": the file gets opened correctly in Import Export sample (both MFC or Qt) in OCCT 7.1.0 (as well as 7.0.0 and 7.2.0). The problem may occur with some other symbols in 7.1.0 -- this is known issue 0027585, fixed in OCCT 7.2.0. Please check if the problem is resolved in OCCT 7.2.0. If the problem still persists, please describe more precisely how to reproduce it. |
|
It seems like the error only occurs when you wrap OCCT into a C#-Layer. Most likely because the string is interpreted as another charset. If you use ASCII-Charset instaed of Unicode the error stills exists in the 7.1-branch Here a minimal running example: #include "TCollection_AsciiString.hxx" #include "TDocStd_Document.hxx" #include "XCAFApp_Application.hxx" #include "STEPCAFControl_Reader.hxx" #include <iostream> using namespace std; using namespace opencascade; int main(int argc, const char* argv[]) { auto filename = "C://temp//Inválid.step"; // <-- If you're using a wchar_t no error will be thrown auto format = TCollection_ExtendedString("MDTV-XCAF"); auto stepDocument = TDocStd_Document(format); auto docHandle = handle<TDocStd_Document>(&stepDocument); auto app = XCAFApp_Application::GetApplication(); app->NewDocument(format, docHandle); auto stepReader = STEPCAFControl_Reader(); auto result = stepReader.Perform(filename, docHandle); if (result != true) { cout << "Error."; stepReader.Reader().PrintCheckLoad(false, IFSelect_PrintCount::IFSelect_GeneralInfo); } else { cout << "No Error!"; } return 0; } So it seems like that without any additional wrapping-metadata the C#-Wrapper will use the ASCII-Method and fail. |
|
When wrapping to C# is concerned, Unicode strings can be passed correctly to C# level, but the way to do that depends on method used for the wrapping. So should I consider the issue as resolved and close it? |
|
Oops, I see: it does not work in C# samples in OCCT 7.1 or 7.2 |
|
Branch CR29069 has been created by kgv. SHA-1: f01a0f38fb04474aa1204efb9da9937b2ab9e445 Detailed log of new commits: Author: kgv Date: Mon Jan 29 11:05:20 2018 +0300 0029069: Samples - handle UNICODE filenames within C++/CLI CSharp sample |
|
Patch is ready for review. http://jenkins-test-10.nnov.opencascade.com/view/CR29069-master-KGV/ |
|
Branch CR29069_1 has been created by kgv. SHA-1: 08584c5516e98e995efb2ad8d415105b5e7fa6a7 Detailed log of new commits: Author: kgv Date: Mon Jan 29 11:05:20 2018 +0300 0029069: Samples - handle UNICODE filenames within C++/CLI CSharp sample |
|
No remarks, please integrate |
|
Combination - OCCT branch : CR29069_1 SHA - 08584c5516e98e995efb2ad8d415105b5e7fa6a7 Products branch : master SHA - 9d16afb77be76e276e46b7b3fc08eb16a4eea45e was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings |
|
Branch CR29069 has been deleted by kgv. SHA-1: f01a0f38fb04474aa1204efb9da9937b2ab9e445 |
|
Branch CR29069_1 has been deleted by kgv. SHA-1: 08584c5516e98e995efb2ad8d415105b5e7fa6a7 |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-08-31 15:43 | sgiesel | New Issue | |
2017-08-31 15:43 | sgiesel | Assigned To | => gka |
2017-10-09 09:53 |
|
Relationship added | duplicate of 0027585 |
2017-10-09 10:04 |
|
Note Added: 0071290 | |
2017-10-09 10:04 |
|
Assigned To | gka => sgiesel |
2017-10-09 10:04 |
|
Status | new => feedback |
2017-10-13 08:55 | sgiesel | Note Added: 0071390 | |
2017-10-13 13:11 |
|
Note Added: 0071410 | |
2017-10-13 13:18 |
|
Note Added: 0071411 | |
2017-10-13 13:18 |
|
Assigned To | sgiesel => apn |
2017-10-13 13:18 |
|
Status | feedback => assigned |
2017-10-13 13:18 |
|
Category | OCCT:Data Exchange => OCCT:Samples |
2017-10-13 13:18 |
|
Target Version | => 7.3.0 |
2018-01-29 10:44 | kgv | File Added: occ_wpf_sample.png | |
2018-01-29 11:03 | kgv | Severity | crash => minor |
2018-01-29 11:03 | kgv | Summary | OpenCascase can't load step-files with some special characters => Samples - handle UNICODE filenames within C++/CLI CSharp sample |
2018-01-29 11:14 | git | Note Added: 0073640 | |
2018-01-29 11:17 | kgv | Relationship replaced | related to 0027585 |
2018-01-29 11:18 | kgv | Relationship added | child of 0022484 |
2018-01-29 11:57 | kgv | Note Added: 0073642 | |
2018-01-29 11:57 | kgv | Assigned To | apn => abv |
2018-01-29 11:57 | kgv | Status | assigned => resolved |
2018-01-29 11:57 | kgv | Additional Information Updated | |
2018-01-29 11:58 | kgv | File Deleted: occ_wpf_sample.png | |
2018-01-31 11:25 | git | Note Added: 0073692 | |
2018-01-31 11:34 |
|
Note Added: 0073693 | |
2018-01-31 11:34 |
|
Assigned To | abv => bugmaster |
2018-01-31 11:34 |
|
Status | resolved => reviewed |
2018-01-31 13:26 | apn | Test case number | => Not needed |
2018-01-31 13:26 | apn | Note Added: 0073696 | |
2018-01-31 13:26 | apn | Status | reviewed => tested |
2018-02-03 18:59 | apn | Changeset attached | => occt master 95f68826 |
2018-02-03 18:59 | apn | Assigned To | bugmaster => apn |
2018-02-03 18:59 | apn | Status | tested => verified |
2018-02-03 18:59 | apn | Resolution | open => fixed |
2018-02-05 11:39 | git | Note Added: 0073765 | |
2018-02-05 11:39 | git | Note Added: 0073766 | |
2018-06-29 21:15 |
|
Fixed in Version | => 7.3.0 |
2018-06-29 21:19 |
|
Status | verified => closed |