From fd74c1d7f43c0d4af3264ba87f74dc405fb74816 Mon Sep 17 00:00:00 2001 From: mpa Date: Fri, 6 Feb 2015 15:09:57 +0300 Subject: [PATCH] 0022804: [CEA 1332] Import a brep file with an accent in its name --- src/GEOM/GEOM_Function.cxx | 5 +++-- src/XAOPlugin/XAOPlugin_ExportDlg.cxx | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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; } -- 2.39.2