Skip to content

Commit

Permalink
Add MSVC Support For UTF-8 (openvinotoolkit#28278)
Browse files Browse the repository at this point in the history
### Details:
- Specifies both the source character set and the execution character
set as UTF-8.
 - Avoid garbled text during Chinese character to UTF-8 conversion. 

### Tickets:
 - *ticket-id*

---------

Co-authored-by: Ilya Lavrenov <[email protected]>
  • Loading branch information
2 people authored and MirceaDan99 committed Jan 22, 2025
1 parent 1ec1cd1 commit cfced48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmake/developer_package/compile_flags/os_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# Build with multiple processes
ov_add_compiler_flags(/MP)

# Specifies both the source character set and the execution character set as UTF-8.
# For details, refer to link: https://learn.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8?view=msvc-170
ov_add_compiler_flags(/utf-8)

# Workaround for an MSVC compiler issue in some versions of Visual Studio 2022.
# The issue involves a null dereference to a mutex. For details, refer to link https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710
if(MSVC AND MSVC_VERSION GREATER_EQUAL 1930)
Expand Down

0 comments on commit cfced48

Please sign in to comment.