From: rnv Date: Tue, 5 Mar 2019 08:35:23 +0000 (+0300) Subject: Run SALOME on Windows with unicode path. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Frnv%2Funicode_path;p=modules%2Fkernel.git Run SALOME on Windows with unicode path. --- diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx index b873c891b..d7d6b3600 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx @@ -2119,7 +2119,12 @@ bool SALOMEDSImpl_Study::DumpStudy(const std::string& thePath, //Create a file that will contain a main Study script std::fstream fp; +#if defined(WIN32) && defined(UNICODE) + std::wstring aConverterFN = Kernel_Utils::utf8_decode_s(aFileName); + fp.open(aConverterFN.c_str(), std::ios::out); +#else fp.open(aFileName.c_str(), std::ios::out); +#endif #ifdef WIN32 bool isOpened = fp.is_open(); @@ -2237,7 +2242,12 @@ bool SALOMEDSImpl_Study::DumpStudy(const std::string& thePath, aFileName += aScriptName+ std::string(".py"); aSeqOfFileNames.push_back(aFileName); +#if defined(WIN32) && defined(UNICODE) + std::wstring aConverterFN2 = Kernel_Utils::utf8_decode_s(aFileName); + fp2.open(aConverterFN2.c_str(), std::ios::out); +#else fp2.open(aFileName.c_str(), std::ios::out); +#endif #ifdef WIN32 isOpened = fp2.is_open();