MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0032409Community[OCCT] OCCT:Data Exchangepublic2021-06-01 10:202021-06-16 12:06
Reporterlucas_morona_164500 
Assigned Tobugmaster 
PrioritynormalSeveritymajor 
StatusfeedbackResolutionunable to reproduce 
PlatformWindowsOSWindowsOS VersionWindows
Product Version[OCCT] 7.3.0 
Target Version[OCCT] 7.6.0*Fixed in Version 
Summary0032409: Bug in OCC with german letter
DescriptionI have a bug in open cascade and i need create a bug in forum, the is open cascade do not import file with German letter "ä​"
Steps To Reproduceimport a file with German letter "ä​"
TagsNo tags attached.
Test case number
Attached Files? file icon Schulungen&Präsentation1.dxf (138,916 bytes) 2021-06-01 10:20

- Relationships
has duplicate 0032410closedbugmaster Community Bug in DXF import 
has duplicate 0032413closedbugmaster Community Bug in DXF import 

-  Notes
(0101535)
kgv (developer)
2021-06-01 10:43
edited on: 2021-06-02 17:57

Dear lucas.

The file is opened fine in CAD Assistant based on OCCT 7.5.0.

Please share the code snippet used for loading the file (and preferably check on newer version of OCCT).

(0101788)
lucas_morona_164500 (reporter)
2021-06-11 17:00

The version of OCC is 7.3.0 not 7.5.0,

    Handle(TDocStd_Document) document;
    Handle(XCAFApp_Application) application = XCAFApp_Application::GetApplication();

    application->NewDocument(m_filePath.toLatin1().constData(), document);
    DXFCAFControl_Reader dxfReaderLayer;
    dxfReaderLayer.SetNameMode(true);
    dxfReaderLayer.ReadFile(static_cast<Standard_CString>(m_filePath.toLatin1().constData()));

    dxfReaderLayer.Transfer(document);
    TDF_Label rootLabel = document->Main();

    m_filePath is the path of file;
(0101789)
kgv (developer)
2021-06-11 17:09

> dxfReaderLayer.ReadFile(static_cast<Standard_CString (m_filePath.toLatin1().constData()));

You are converting string into Latin code page which leads to data loss of non-Latin symbols.
Presuming that m_filePath is a QString, the conversion normally looks like this:

> TCollection_AsciiString aFilePathUtf8 (m_filePath.toUtf8().constData());
> dxfReaderLayer.ReadFile (aFilePathUtf8.ToCString());
(0101863)
lucas_morona_164500 (reporter)
2021-06-16 12:03

I tested is working thank you very much?

- Issue History
Date Modified Username Field Change
2021-06-01 10:20 lucas_morona_164500 New Issue
2021-06-01 10:20 lucas_morona_164500 Assigned To => msv
2021-06-01 10:20 lucas_morona_164500 File Added: Schulungen&Präsentation1.dxf
2021-06-01 10:41 kgv Relationship added child of 0025323
2021-06-01 10:43 kgv Note Added: 0101535
2021-06-01 10:43 kgv Assigned To msv => lucas_morona_164500
2021-06-01 10:43 kgv Status new => feedback
2021-06-01 10:43 kgv Category OCCT:Modeling Algorithms => OCCT:Data Exchange
2021-06-01 10:44 kgv Resolution open => unable to reproduce
2021-06-01 10:44 kgv Target Version => 7.6.0*
2021-06-01 15:07 kgv Relationship added has duplicate 0032410
2021-06-02 17:54 kgv Relationship added has duplicate 0032413
2021-06-02 17:57 kgv Note Edited: 0101535 View Revisions
2021-06-11 17:00 lucas_morona_164500 Note Added: 0101788
2021-06-11 17:09 kgv Note Added: 0101789
2021-06-16 12:03 lucas_morona_164500 Note Added: 0101863
2021-06-16 12:06 kgv Assigned To lucas_morona_164500 => bugmaster


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker