Skip to content

Windows: compile plugin with /utf-8 (#354) - #355

Merged
fotiDim merged 1 commit into
mainfrom
fix/windows-utf8-build-354
Oct 18, 2026
Merged

fotiDim merged 1 commit into
mainfrom
fix/windows-utf8-build-354

Conversation

@fotiDim

@fotiDim fotiDim commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Root cause

windows/src/generated/universal_ble.g.h is UTF-8 without a BOM and contains em dashes copied verbatim from the Dart doc comments in pigeon/universal_ble.dart. Under a DBCS system code page, MSVC decodes those bytes using the ANSI code page and emits C4819; /WX turns it into C2220 and the plugin target fails.

This is not resolved by the Pigeon 29 migration: the current v29.0.10 header still contains the same 8 non-ASCII lines. The flag is generator-version-independent and also covers any future non-ASCII output.

Testing

  • flutter analyze — no issues
  • flutter test — 285 tests passed
  • The existing Windows CI job (flutter build windows) compiles the target. The C4819 failure itself cannot be reproduced on macOS or on the en-US GitHub Windows runner, since those code pages can represent all three UTF-8 bytes.

Fixes #354.

@fotiDim
fotiDim merged commit 3afa0c0 into main Oct 18, 2026
3 checks passed
@fotiDim
fotiDim deleted the fix/windows-utf8-build-354 branch October 18, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant