]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0022804: [CEA 1332] Import a brep file with an accent in its name
authormpa <mpa@opencascade.com>
Fri, 6 Feb 2015 12:09:57 +0000 (15:09 +0300)
committermpa <mpa@opencascade.com>
Fri, 6 Feb 2015 12:09:57 +0000 (15:09 +0300)
src/GEOM/GEOM_Function.cxx
src/XAOPlugin/XAOPlugin_ExportDlg.cxx

index ab8e57fd6bc0172297297a54324fdd90ac54e971..95100afe1963c6fa22dc3260cda77e7bc740630e 100644 (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;
 }
 
index 01e570f6460b89a0d15ea196c56871aa2357eb62..a4a88ee032d4da31f10e6997d16a75f4ab2377a3 100644 (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;
 }