View Issue Details

IDProjectCategoryView StatusLast Update
0033354CommunityOCCT:Data Exchangepublic2023-08-07 15:55
Reportercqwuxiaolong_156936 Assigned Tobugmaster  
PrioritynormalSeveritymajor 
Status closedResolutionno change required 
Product Version7.7.0 
Target Version7.8.0 
Summary0033354: Data Exchange - File saved path incorrect string
Description
Handle(XCAFApp_Application) XcafDocument::GetApplication()
{
  STEPCAFControl_Controller::Init();
  IGESControl_Controller::Init();
  static Handle(XCAFApp_Application) anApplication;
  if (anApplication.IsNull())
  {
    anApplication = XCAFApp_Application::GetApplication();
    BinDrivers::DefineFormat(anApplication);
    BinLDrivers::DefineFormat(anApplication);
    BinTObjDrivers::DefineFormat(anApplication);
    BinXCAFDrivers::DefineFormat(anApplication);
    StdDrivers::DefineFormat(anApplication);
    StdLDrivers::DefineFormat(anApplication);
    XmlDrivers::DefineFormat(anApplication);
    XmlLDrivers::DefineFormat(anApplication);
    XmlTObjDrivers::DefineFormat(anApplication);
    XmlXCAFDrivers::DefineFormat(anApplication);
  }
  return anApplication;
}

PCDM_ReaderStatus rt = XcafDocument::Open("./工.xbf", aDocument);   //ok
XcafDocument::SaveAs(aDocument, "./口.xbf");  //error  file name became this 口.xbf
TagsNo tags attached.
Test case number

Activities

dpasukhi

2023-04-03 11:12

administrator   ~0113351

Dear @cqwuxiaolong_156936
XcafDocument::Open("./工.xbf", aDocument); call TCollection_ExtendedString constructor with 'const char*' parameter.
So, in this case you need to create the own variable TCollection_ExtendedString aPath(./工.xbf", true) and use it OR use streams to read/write;
The other solution - use 'wchar_t' or 'char16'_t istdead of 'const char'. "./工.xbf" - const char by default that is not correct

dpasukhi

2023-08-02 01:52

administrator   ~0113828

Dear @bugmaster
please close the issue

Issue History

Date Modified Username Field Change
2023-04-03 05:04 cqwuxiaolong_156936 New Issue
2023-04-03 05:04 cqwuxiaolong_156936 Assigned To => ika
2023-04-03 11:02 dpasukhi Category OCCT:Application Framework => OCCT:Data Exchange
2023-04-03 11:02 dpasukhi Product Version => 7.7.0
2023-04-03 11:02 dpasukhi Target Version => 7.8.0
2023-04-03 11:02 dpasukhi Summary File saved path string error (version 7.8.0) => Data Exchange - File saved path incorrect string
2023-04-03 11:02 dpasukhi Description Updated
2023-04-03 11:12 dpasukhi Assigned To ika => cqwuxiaolong_156936
2023-04-03 11:12 dpasukhi Status new => feedback
2023-04-03 11:12 dpasukhi Note Added: 0113351
2023-08-02 01:52 dpasukhi Assigned To cqwuxiaolong_156936 => bugmaster
2023-08-02 01:52 dpasukhi Note Added: 0113828
2023-08-07 15:55 vglukhik Status feedback => closed
2023-08-07 15:55 vglukhik Resolution open => no change required