0022804: [CEA 1332] Import a brep file with an accent in its name

This commit is contained in:
mpa 2015-02-06 15:09:57 +03:00
parent 3150ecbf3b
commit fd74c1d7f4
2 changed files with 5 additions and 4 deletions

View File

@ -589,9 +589,10 @@ TCollection_AsciiString GEOM_Function::GetString(int thePosition)
Handle(TDataStd_Comment) aString;
TDF_Label anArgLabel = ARGUMENT(thePosition);
if(!anArgLabel.FindAttribute(TDataStd_Comment::GetID(), aString)) return aRes;
char *str = new char[aString->Get().LengthOfCString()+1];
aString->Get().ToUTF8CString(str);
aRes = TCollection_AsciiString(str);
_isDone = true;
aRes = TCollection_AsciiString(aString->Get());
return aRes;
}

View File

@ -450,7 +450,7 @@ bool XAOPlugin_ExportDlg::execute()
// call engine function
GEOM::IXAOOperations_var aXAOOp = GEOM::IXAOOperations::_narrow( getOperation() );
res = aXAOOp->ExportXAO(m_mainObj, groups, fields,
author.toStdString().c_str(),
fileName.toStdString().c_str());
author.toUtf8().constData(),
fileName.toUtf8().constData());
return res;
}