]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOM_I/GEOM_Gen_i.cc
Salome HOME
Run SALOME with UNICODE path on Windows platform.
[modules/geom.git] / src / GEOM_I / GEOM_Gen_i.cc
index 26d83ca9a882fc8be81236cb0323ad630bab4592..da12563f2a0a01b19f6deffafc07bfb838195c52 100644 (file)
@@ -2532,21 +2532,14 @@ void GEOM_Gen_i::LoadPlugin(const std::string& theLibName)
   // check, if corresponding operations are already created
   if (myOpCreatorMap.find(theLibName) == myOpCreatorMap.end()) {
 #if WIN32
-  #if UNICODE
-    //RNV: this is workaround for providing compilation,
-    //     path should be processed as unicode string.
-    size_t length = strlen(aPlatformLibName.c_str()) + sizeof(char);
-    wchar_t* aPath = new wchar_t[length + 1];
-    memset(aPath, '\0', length);
-    mbstowcs(aPath, aPlatformLibName.c_str(), length);
+  #if UNICODE 
+       std::wstring strL = Kernel_Utils::utf8_decode_s(aPlatformLibName);
+    const wchar_t* aPath = strL.c_str();
   #else
     const char* aPath = aPlatformLibName.c_str();
   #endif
     // load plugin library
     LibHandle libHandle = LoadLib(aPath);
-  #if UNICODE
-    delete aPath;
-  #endif
 #else
     LibHandle libHandle = LoadLib(aPlatformLibName.c_str());
 #endif