Salome HOME
Python 3: PoC to correctly manage unicode strings from Python
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_StudyManager.cxx
index ba0a8f20652fc975c66b5730b227923031f6f978..4dc29e939e34b312a158337cd8cfbbbdcdef8c1b 100644 (file)
@@ -117,7 +117,8 @@ _PTR(Study) SALOMEDS_StudyManager::Open(const std::string& theStudyUrl)
   //SRN: Pure CORBA Open as it does more initialization than the local one
   SALOMEDSClient_Study* aStudy = NULL;
 
-  SALOMEDS::Study_var aStudy_impl = _corba_impl->Open((char*)theStudyUrl.c_str());
+  std::wstring wtheStudyUrl = std::wstring(theStudyUrl.begin(), theStudyUrl.end());
+  SALOMEDS::Study_var aStudy_impl = _corba_impl->Open((wchar_t*)theStudyUrl.c_str());
   if(CORBA::is_nil(aStudy_impl)) return  _PTR(Study)(aStudy);
 
   aStudy = new SALOMEDS_Study(aStudy_impl.in());