From: mpa Date: Fri, 6 Feb 2015 12:09:57 +0000 (+0300) Subject: 0022804: [CEA 1332] Import a brep file with an accent in its name X-Git-Tag: V7_6_0a1~56 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fd74c1d7f43c0d4af3264ba87f74dc405fb74816;p=modules%2Fgeom.git 0022804: [CEA 1332] Import a brep file with an accent in its name --- diff --git a/src/GEOM/GEOM_Function.cxx b/src/GEOM/GEOM_Function.cxx index ab8e57fd6..95100afe1 100644 --- a/src/GEOM/GEOM_Function.cxx +++ b/src/GEOM/GEOM_Function.cxx @@ -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; } diff --git a/src/XAOPlugin/XAOPlugin_ExportDlg.cxx b/src/XAOPlugin/XAOPlugin_ExportDlg.cxx index 01e570f64..a4a88ee03 100644 --- a/src/XAOPlugin/XAOPlugin_ExportDlg.cxx +++ b/src/XAOPlugin/XAOPlugin_ExportDlg.cxx @@ -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; }