utf8: portable Windows UTF-8 boundary for argv, fopen and CreateFile

This commit is contained in:
Pascal
2026-05-14 14:10:26 +02:00
parent 57d12ba4e5
commit eb48f33f09
8 changed files with 119 additions and 14 deletions
+4 -1
View File
@@ -19,9 +19,12 @@ add_custom_target(version ALL
# and older x86_64 toolchains need the explicit dependency.
find_package(Threads REQUIRED)
# Suppress MSVC fopen/sprintf deprecation warnings
# Suppress MSVC fopen/sprintf deprecation warnings, force UTF-8 source and
# execution charsets so non-ASCII string literals (CJK in text-chunker.h,
# prompt-builder.cpp) survive the compile without a BOM.
if(MSVC)
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
add_compile_options(/utf-8)
endif()
# Put executables and backend .so in the same directory (build root).