// 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