Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[CORE] Make an additional conversion from std::string to std::wstring (#29058)

barnasm1a84ae96991bd
diff --git a/src/common/util/include/openvino/util/file_util.hpp b/src/common/util/include/openvino/util/file_util.hpp
index ee6ea7a7e57..0690d098d4e 100644
--- a/src/common/util/include/openvino/util/file_util.hpp
+++ b/src/common/util/include/openvino/util/file_util.hpp
@@ -239,7 +239,11 @@ inline std::string from_file_path(const ov::util::Path& path) {
// TODO: remove this function after all calls use Path
inline FilePath to_file_path(const ov::util::Path& path) {
+#if defined(_WIN32) && defined(OPENVINO_ENABLE_UNICODE_PATH_SUPPORT)
+ return ov::util::string_to_wstring(path.string());
+#else
return path.native();
+#endif
}
#ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT