Archived issue #0033354
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
Public activity
2 archived notes
Participants are labeled by their role within this record.
Dear Commenter 3
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
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
Dear Commenter 4
please close the issue
please close the issue