nvda
7d25bc76 - Tell MSVC to compile NVDAHelper sources as UTF-8 (#21032)

Commit
12 days ago
Tell MSVC to compile NVDAHelper sources as UTF-8 (#21032) Fixes #20584. Summary of the issue: MSVC can read UTF-8 source files without a byte-order mark using the current Windows code page. On systems that use a different code page, it can misread characters in cppjieba headers and report C++ syntax errors. Description of user facing changes: No intended changes to NVDA’s interface or commands. Description of developer facing changes: The NVDAHelper build explicitly uses UTF-8 instead of relying on the Windows code page. This makes the compiler read UTF-8 source files consistently across build machines. Description of development approach: Added /utf-8 to the common CCFLAGS in nvdaHelper/archBuild_sconscript. The third-party build environment inherits these flags, so the option also applies to cppjieba. MSVC’s /utf-8 option sets both the source and execution character sets. It therefore also determines the encoding of ordinary string literals in compiled code.
Author
Parents
Loading