Skip to content

Pass /utf-8 to MSVC so the build survives non-CP1252 host codepages. - #369

Merged
zzcgumn merged 1 commit into
dds-bridge:developfrom
vxcgv:fix/msvc-utf8-source-charset
Sep 11, 2026
Merged

Pass /utf-8 to MSVC so the build survives non-CP1252 host codepages.#369
zzcgumn merged 1 commit into
dds-bridge:developfrom
vxcgv:fix/msvc-utf8-source-charset

Conversation

@vxcgv

@vxcgv vxcgv commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Several BOM-less UTF-8 sources make cl.exe fall back to the system ANSI codepage; library/src/api/dds_constants.hpp line 47 holds an em dash that CP936 cannot decode, so the compile fails with C4819 escalated by /WX into C2220. English CP1252 CI runners decode those bytes without complaint, which is why the breakage only surfaces on localized Windows.

The flag belongs in the //:build_windows and //:debug_build_windows select arms of DDS_CPPOPTS, not in a build:windows --cxxopt: that flag keys off the host OS and therefore also reaches wasm transitions, where clang rejects an MSVC-only flag with "no such file or directory: '/utf-8'". ci_windows_cppopts_test now guards both halves, and fails without the flag.

Several BOM-less UTF-8 sources make cl.exe fall back to the system ANSI
codepage; library/src/api/dds_constants.hpp line 47 holds an em dash that
CP936 cannot decode, so the compile fails with C4819 escalated by /WX into
C2220. English CP1252 CI runners decode those bytes without complaint, which
is why the breakage only surfaces on localized Windows.

The flag belongs in the //:build_windows and //:debug_build_windows select
arms of DDS_CPPOPTS, not in a build:windows --cxxopt: that flag keys off the
host OS and therefore also reaches wasm transitions, where clang rejects an
MSVC-only flag with "no such file or directory: '/utf-8'".
ci_windows_cppopts_test now guards both halves, and fails without the flag.
@zzcgumn
zzcgumn merged commit 3463935 into dds-bridge:develop Sep 11, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants