issue #1027 use unicode filepaths

This commit is contained in:
Sebastian Hoogen
2014-09-21 23:45:32 +02:00
committed by wmayer
parent 05af9207a3
commit a53a239f2f
28 changed files with 396 additions and 243 deletions

View File

@@ -76,6 +76,7 @@
#include "ImportStep.h"
#include "PartFeature.h"
#include "ProgressIndicator.h"
#include "encodeFilename.h"
using namespace Part;
@@ -95,8 +96,11 @@ int Part::ImportStepParts(App::Document *pcDoc, const char* Name)
str << "File '" << Name << "' does not exist!";
throw Base::Exception(str.str().c_str());
}
std::string encodednamestr = encodeFilename(std::string(Name));
const char * encodedname = encodednamestr.c_str();
if (aReader.ReadFile((Standard_CString)Name) != IFSelect_RetDone) {
if (aReader.ReadFile((Standard_CString)encodedname) !=
IFSelect_RetDone) {
throw Base::Exception("Cannot open STEP file");
}