Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: set /utf-8 flag when using MSVC (#4975)
MSVC by default decodes source files in the current Windows code page if they don't have a Unicode BOM, and also encodes strings and chars into the current code page before storing them into the compiled binary. Our files are always encoded in UTF-8, and our code always assumes runtime strings are encoded in UTF-8, so we should pass the `/utf-8` flag to MSVC. Microsoft Docs: https://learn.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8
- Loading branch information