Repository navigation
Windows: compile plugin with /utf-8 (#354) - #355
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
universal_ble_plugintarget with/utf-8so MSVC reads Pigeon's generated sources as UTF-8./WXthat Flutter'sapply_standard_settingsadds, on systems whose ANSI code page is not UTF-8 (936, 932, 949, 950, ...).Root cause
windows/src/generated/universal_ble.g.his UTF-8 without a BOM and contains em dashes copied verbatim from the Dart doc comments inpigeon/universal_ble.dart. Under a DBCS system code page, MSVC decodes those bytes using the ANSI code page and emits C4819;/WXturns it into C2220 and the plugin target fails.This is not resolved by the Pigeon 29 migration: the current
v29.0.10header 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 issuesflutter test— 285 tests passedflutter 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.