From 78c6cc1362c39e3f1f778c52ae2a1c82badeec20 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 7 Dec 2020 17:54:17 +0100 Subject: [PATCH] Import: [skip ci] fixes #0004477: Can't import .STEP files with cyrillic symbols --- src/Mod/Import/App/AppImportPy.cpp | 3 ++- src/Mod/Import/Gui/AppImportGuiPy.cpp | 3 ++- src/Mod/Part/App/TopoShape.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Mod/Import/App/AppImportPy.cpp b/src/Mod/Import/App/AppImportPy.cpp index 63a7ab6161..3f629d102b 100644 --- a/src/Mod/Import/App/AppImportPy.cpp +++ b/src/Mod/Import/App/AppImportPy.cpp @@ -363,7 +363,8 @@ private: Base::Reference hGrp = App::GetApplication().GetUserParameter() .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part")->GetGroup("STEP"); - makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)Utf8Name.c_str())); + // https://forum.freecadweb.org/viewtopic.php?f=8&t=52967 + //makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)Utf8Name.c_str())); makeHeader.SetAuthorValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Author", "Author").c_str())); makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Company").c_str())); makeHeader.SetOriginatingSystem(new TCollection_HAsciiString(App::GetApplication().getExecutableName())); diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp b/src/Mod/Import/Gui/AppImportGuiPy.cpp index aa06d3c393..d6054176fe 100644 --- a/src/Mod/Import/Gui/AppImportGuiPy.cpp +++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp @@ -662,7 +662,8 @@ private: Base::Reference hGrp = App::GetApplication().GetUserParameter() .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part")->GetGroup("STEP"); - makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)Utf8Name.c_str())); + // https://forum.freecadweb.org/viewtopic.php?f=8&t=52967 + //makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)Utf8Name.c_str())); makeHeader.SetAuthorValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Author", "Author").c_str())); makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Company").c_str())); makeHeader.SetOriginatingSystem(new TCollection_HAsciiString(App::GetApplication().getExecutableName())); diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index f4b080eb6d..dfa107766f 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -991,7 +991,8 @@ void TopoShape::exportStep(const char *filename) const throw Base::FileException("Error in transferring STEP"); APIHeaderSection_MakeHeader makeHeader(aWriter.Model()); - makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)(encodeFilename(filename).c_str()))); + // https://forum.freecadweb.org/viewtopic.php?f=8&t=52967 + //makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)(encodeFilename(filename).c_str()))); makeHeader.SetAuthorValue (1, new TCollection_HAsciiString("FreeCAD")); makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString("FreeCAD")); makeHeader.SetOriginatingSystem(new TCollection_HAsciiString("FreeCAD"));