If there is no BOM, MSVC defaults to the user's code page which can result in errors if UTF-8 characters are present in the source files.
@@ -67,7 +67,8 @@ if(OS_WINDOWS AND MSVC)
/DUNICODE
/D_UNICODE
/D_CRT_SECURE_NO_WARNINGS
- /D_CRT_NONSTDC_NO_WARNINGS)
+ /D_CRT_NONSTDC_NO_WARNINGS
+ /utf-8)
add_link_options(
"LINKER:/OPT:REF"